column should reset always at last position, what ever the last position at run time

Hi i want Auto hide and unhide feature,i am using
Syncfusion.Grid.Grouping.Windows, by property of
Syncfusion.Grid.Grouping.Windows.Remove("ID"),
and Syncfusion.Grid.Grouping.Windows.move(1,0)

Note:Example

i have grid with full data, end user drag column from (3 to 2 position), so how i can trace this column at dragging time,and if unhide then column should go to 2 nd position not 3 rd position.



if i use Syncfusion.Grid.Grouping.Windows.visiblecolumn, so by this i can see position where i bind grid, means i can get 3 rd position.

Means : column should reset always at last position

1 Reply

HA haneefm Syncfusion Team May 7, 2007 04:01 PM UTC

Hi,

You can handle the TableControlQueryAllowDragColumn event and get dragging column name and position. Below is a code snippet. If you want to reinsert the particular column then use the TableDescriptor.VisibleColumns collection in a Grid. Here is a code snippet.

this.gridGroupingControl1.TableDescriptor.VisibleColumns.Insert(3,"ColumnName");

this.gridGroupingControl1.TableControlQueryAllowDragColumn +=new GridQueryAllowDragColumnEventHandler(gridGroupingControl1_TableControlQueryAllowDragColumn);

private void gridGroupingControl1_TableControlQueryAllowDragColumn(object sender, GridQueryAllowDragColumnEventArgs e)
{
if( e.Reason == GridQueryAllowDragColumnReason.MouseUp)
{
e.AllowDrag = false;
Console.WriteLine(e.InsertBeforeColumn +":::" + e.Column );
}
}

Here is a forum thread that discuss with the last column dragging ina grid.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=58196

Best regards,
Haneef

Loader.
Up arrow icon