AD
Administrator
Syncfusion Team
April 19, 2005 09:05 AM UTC
Try using this code:
int i = gt.FilteredRecords.IndexOf(gt.CurrentRecord);
gt.CurrentRecord.Delete();
gt.CurrentRecord = gt.FilteredRecords[i];
KK
Kjetil Kåresen
April 19, 2005 09:51 AM UTC
I added the following tests to your code
int i = gt.FilteredRecords.IndexOf(gt.CurrentRecord);
if(i < 0) return;
gt.CurrentRecord.Delete();
if(i >= gt.FilteredRecords.Count) return;
gt.CurrentRecord = gt.FilteredRecords[i];
Now it works perfect. Thanks. Your help is invaluable and has convinced me to buy the Syncfusion package.