We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

When resize the column header, how to get the resized column name?

I have syncfusion grid data control( ID, name, address, contact number,.....). When I drag and drop column headers, I save the column names into database

private void grid_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)

{

var rowColIndex = this.grid.Model.Grid.PointToCellRowColumnIndex(e);

DragHeaderText = Convert.ToString(this.grid.Model[rowColIndex.RowIndex, rowColIndex.ColumnIndex].CellValue);

}


private void grid_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)

{

var rowColIndex = this.grid.Model.Grid.PointToCellRowColumnIndex(e);

TargetHeaderText = Convert.ToString(this.grid.Model[0, rowColIndex.ColumnIndex].CellValue);

}

if DragHeaderText and TargetHeaderText  are not the same, I save into database in order to get the sequence column headers. It is working fine.

The main problem is when I resize the column headers(name), DragHeaderText is showing name but TargetHeaderText is showing address. So it saves into database without changing the column header. Could you please advice me how to get the resized column name in DragHeaderText and TargetHeaderText when I resize the column headers?


Thank you


1 Reply

EM Elavarasan M Syncfusion Team December 3, 2014 01:07 PM UTC

Hi Shwe,

 

We have tested the reported behavior with our sample. But we are unable to reproduce the reported behavior “While resizing the columns, DragHeaderText and TargetHeaderText are differs”. For your reference, we have attached the sample and video. In this sample we have printed the column header name while resizing. Please find the attached video and sample.

 

Please let us know if you have any queries.

 

Thanks,

Elavarasan M


Attachment: Resizing_40e978d2.zip

Loader.
Live Chat Icon For mobile
Up arrow icon