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
close icon

Filter order

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. Thanks.

4 Replies

AD Administrator Syncfusion Team December 31, 2004 06:42 AM UTC

>>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.


SV sve December 31, 2004 06:52 AM UTC

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.


SV sve December 31, 2004 07:02 AM UTC

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...


AD Administrator Syncfusion Team December 31, 2004 07:22 AM UTC

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://64.78.18.34/Support/Forums/message.aspx?MessageID=10655

Loader.
Live Chat Icon For mobile
Up arrow icon