I try to catch the event of double click on a column for change the order filter and in don''t find it. Any ideas ?
I do so because i want to display a message "accept change?" when the row change and was modified with possibility to not change the row if response is "no"
Today i put this message in the rowEnter event with e.cancel when response is no.
Is there a solution to attach this message to an event of type "row changed" with a possibility to cancel event ?
I used BindingContex[myDataTable].PositionChanged event but i don''t find how to cancel this event.
ADAdministrator Syncfusion Team December 31, 2004 01:42 AM
>>change the order filter
I do not know what you mean by this.
You can normally catch a double click on cell either using this.gridControl1.CurrentCellControlDoubleClick or this.gridControl1.CellDoubleClick. (The first one happens if your first click activates the cell.)
You can try to use the RowLeave event and prevent the user from leaving by setting e.Cancel = true.
SVsveDecember 31, 2004 01:52 AM
In a GridDataBoundGrid when i double click on a column the column is sorting in alphabetical order. I don''t find this event.
I try the row leave event, thanks for your answer.
SVsveDecember 31, 2004 02:02 AM
The problem is the RowLeave event isn''t fired when i sort the grid or when i filter the grid with a filterBar, however the curent record changing...
ADAdministrator Syncfusion Team December 31, 2004 02:22 AM
If you double click a column header to sort, the CellDoubleClick should be raised, and if you do not want to sort that column, you can set e.Cancel = true.
As far as preventing a Filter, how are you filtering? If you are using a GrudFilterBar, then simplest thing to do is not to enable that column for filtering to begin with. (See our FilterBar sample.)
If the sort or filter is done outside the grid, then teh DataView.ListChanged event is rasied with a ListChangedType=Reset. When the grid sees this event, it responds to the ListChangedType.Reset by resetting the grid. If you want to maintain the same current record before and after the sort, here is a forum thread that has a sample in it. http://184.108.40.206/Support/Forums/message.aspx?MessageID=10655