This is a migrated thread and some comments may be shown as answers.

Column position changed event is not longer existing?!?

1 Answer 163 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Stephan Neumann
Top achievements
Rank 1
Stephan Neumann asked on 06 May 2015, 09:50 AM

What is the event for "column posion changed"?

Up to now I used ColumnIndexChanged in oder version of telerik or CollectionChanged event in newer telerik verion. But this event is no longer existing ?!?

 

1 Answer, 1 is accepted

Sort by
0
Ralitsa
Telerik team
answered on 08 May 2015, 08:09 AM
Hi Stephan,

Thank you for contacting us. 

The ColumnIndexChanged event is removed since Q2 2014. You need to subscribe to the CollectionChanging event which is fired before an item is added, removed, changed, moved, or the entire list is refreshed. Please take a look at the following code example: 
//subscribe to the CollectionChanging event
radGridView1.MasterTemplate.Columns.CollectionChanging += Columns_CollectionChanging;
  
//handle the event
void Columns_CollectionChanging(object sender, Telerik.WinControls.Data.NotifyCollectionChangingEventArgs e)
{
    if (e.Action == NotifyCollectionChangedAction.Move)
    {
        e.Cancel = true;
    }
}

Should you have further questions, I would be glad to help.
 
Regards,
Ralitsa
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
GridView
Asked by
Stephan Neumann
Top achievements
Rank 1
Answers by
Ralitsa
Telerik team
Share this question
or