There is no row at position 0

I am getting the follwoing problem "There is no row at position 0" This is happening after i have clear my dataset dataset1.tables[0].rows.clear; but the focus is still on the grid. when the focus is lost from the grid, this error is coming to me. I am not able to locate this problem where it raise. The row position also varying!!! Can you please help me on this? Please reply me ASAP. urgent

2 Replies

AD Administrator Syncfusion Team July 26, 2004 09:19 AM UTC

Is there an open edit going on when you try to zap your DataTable? If so, you might try calling grid.CurrentCell.CancelEdit(); grid.Binder.EndEdit(); before you clear things. If that does not resolve the problem, you might try setting grid.BindingContext[grid.DataSource, grid.DataMember].Position = -1; before clearing your table. You could also try calling grid.CurrentCell.MoveTo(-1, -1);


AD Administrator Syncfusion Team July 26, 2004 09:34 AM UTC

Thank you very much for your fast and efficient response. This reply helped me lot. Thanks.

Loader.
Up arrow icon