GDBG - FilterBar - Index Out of Range Exception

Hi, I have a GDBG located in a TabPage and a filter bar wired to the grid. Without any filter defined, I change the value of a cell in the 24th row. Then I apply a filter on a different column; the result has 10 rows. When I click on another tabpage I receive a warning like : "There is no row at position 24". Actually at the backend, A System.Data.IndexOutOfRange exception is thrown by System.Data.dll but I can not catch it by a "catch clause". Do you have any idea of what happens?

3 Replies

BI bizdin March 21, 2004 10:54 PM UTC

Another clue; In the same pattern, if I change the cell in the 2nd row rather than 24th row, I receive no warnings. And also, even if I receive any warnings, the TabPage that I click on activates with no more error or warning, but when I try to return error-phrone tabpage I receive the same warning and that TabPage does not activates again..


AD Administrator Syncfusion Team March 22, 2004 07:15 AM UTC

The edit is not being saved. I think you can work around this problem by handling CurrentCellActivating, and explicitly ending the edit in this case. private void gridDataBoundGrid1_CurrentCellActivating(object sender, GridCurrentCellActivatingEventArgs e) { if(this.gridDataBoundGrid1.Binder.IsEditing && e.RowIndex == 1) this.gridDataBoundGrid1.Binder.EndEdit(); }


BI bizdin March 22, 2004 08:12 AM UTC

That solution worked pretty well; Thanks!

Loader.
Up arrow icon