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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Thread ID:

Created:

Updated:

Platform:

Replies:

117705 Dec 2,2014 09:47 AM UTC Dec 3,2014 01:07 PM UTC WPF 1
loading
Tags: GridDataControl
Shwe
Asked On December 2, 2014 09:47 AM UTC

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


Elavarasan M [Syncfusion]
Replied On 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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;