Issue deleting last row from Grouping DataGrid

Hi,

I am facing issue when i delete last row from the grid and try to select any of the other row from the grid. Datagrid datasource is custom collection. Please find attached a sample application using which you would be able to replicate the issue.

Steps to replicate the issue
1. Check the checkbox of last row and click on "Delete" button.
2. Again check the checkbox of the last row and click on "Delete" button"
3. Now try selecting or DoubleClick any of the row,
following error message is displayed
"Specified argument was out of the range of valid values.Parameter name: Index was out of range. Must be non-negative and less than the size of the collection."

Even though my actual application is more complex (event based & database driven) than the attached sample application the issue that i am facing is the same.

Environment :
Visual Studion 2003
Sysncfusion version 4.101.0.50

Thanks,
Gopi

DeleteDataGridRowIssue.zip

16 Replies

AD Administrator Syncfusion Team October 3, 2006 10:45 AM UTC

Hi Gopi,

Please refer to the below forum thread for more details.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=26385

Thanks,
Haneef


GJ Gopinath Jayamuni October 3, 2006 01:10 PM UTC

Hi Haneef,

Thanks for your reply. I tried using the solution provided in the following thread as mentioned, but it doesnt solve my problem
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=26385

Could you please provide fix to the attached solution file.


Environment :
Visual Studion 2003
Sysncfusion version 4.101.0.50

Thanks,
Gopi


DeleteDataGridRowIssue0.zip


AD Administrator Syncfusion Team October 4, 2006 05:55 AM UTC

Hi Gopi,

You need to change the position of the CurrencyManager before the delete the record from the GridTable. Below is a code snippet

this._gridNoteSearch.Table.GetCurrencyManager().Position -= 1;

Sample : http://www.syncfusion.com/Support/user/uploads/DeleteDataGridRowIssue_53bef55b.zip

Thanks,
Haneef


GJ Gopinath Jayamuni October 4, 2006 02:56 PM UTC

Hi Haneef,

Thanks for your reply. Your sample code solves
the issue that i was facing but i have one more issue that stills persists even with your fix. I have modified your sample code inorder to replicate it in the application.

Please follow the below steps inorder to replicate the issue.
Step 1 : Double click on the last row of the grid. This will pop up a window.
Step 2. Click on the "Delete" button in the popup window.
Step 3. Once i delete the record from the custom collection system throws exception "Specified argument was out of the range of valid values"

I am unable to trap/avoid this error. It will be of great help if u can give fix this issue.

Environment :
Visual Studion 2003
Sysncfusion version 4.101.0.50

Thanks,
Gopi


DeleteDataGridRowIssue1.zip


AD Administrator Syncfusion Team October 5, 2006 04:45 AM UTC

Hi Gopi,

You can change the position of the CurrencyManager before the delete the record from the grid. Here is a code snippet

if( this.manager != null )
this.manager.Position -= 1;
int index = _criterias.CriteriaList.IndexOfCriteriaId(_criteria.Id);
_criterias.CriteriaList.RemoveAt(index);
this.Close();

Modified Sample: http://www.syncfusion.com/Support/user/uploads/DeleteDataGridRowIssue_9040fb36.zip

Best Regards,
Haneef


GJ Gopinath Jayamuni October 5, 2006 01:00 PM UTC

Hi Haneef,

Thanks for your reply. I get the same error even with your modified solution file.

Please follow the below steps inorder to replicate the issue.
Step 1 : Double click on the last row of the grid. This will pop up a window.
Step 2. Click on the "Delete" button in the popup window.
Step 3. System throws exception "Specified argument was out of the range of valid values"


Environment :
Visual Studion 2003
Sysncfusion version 4.101.0.50

Thanks,
Gopi


AD Administrator Syncfusion Team October 6, 2006 11:58 AM UTC

Hi Gopi,

We have fixed couple this issue in 4.3 version. Can you please try your application in this version to see if that avoids the exceptions?

Thanks,
Haneef


GJ Gopinath Jayamuni October 9, 2006 03:16 PM UTC

Hi Haneef,

Thanks for your reply. Due to some constraints we will not be able to upgrade to version 4.3 as suggested by you. Can you please give a fix/hack to this issue with Sysncfusion version 4.101.0.50.

Thanks,
Gopi


GJ Gopinath Jayamuni October 9, 2006 03:16 PM UTC

Hi Haneef,

Thanks for your reply. Due to some constraints we will not be able to upgrade to version 4.3 as suggested by you. Can you please give a fix/hack to this issue with Sysncfusion version 4.101.0.50.

Thanks,
Gopi


GJ Gopinath Jayamuni October 9, 2006 03:17 PM UTC

Hi Haneef,

Thanks for your reply. Due to some constraints we will not be able to upgrade to version 4.3 as suggested by you. Can you please give a fix/hack to this issue with Sysncfusion version 4.101.0.50.

Thanks,
Gopi


GJ Gopinath Jayamuni October 9, 2006 03:17 PM UTC

Hi Haneef,

Thanks for your reply. Due to some constraints we will not be able to upgrade to version 4.3 as suggested by you. Can you please give a fix/hack to this issue with Sysncfusion version 4.101.0.50.

Thanks,
Gopi


GJ Gopinath Jayamuni October 9, 2006 03:17 PM UTC

Hi Haneef,

Thanks for your reply. Due to some constraints we will not be able to upgrade to version 4.3 as suggested by you. Can you please give a fix/hack to this issue with Sysncfusion version 4.101.0.50.

Thanks,
Gopi


GJ Gopinath Jayamuni October 9, 2006 03:17 PM UTC

Hi Haneef,

Thanks for your reply. Due to some constraints we will not be able to upgrade to version 4.3 as suggested by you. Can you please give a fix/hack to this issue with Sysncfusion version 4.101.0.50.

Thanks,
Gopi


AD Administrator Syncfusion Team October 10, 2006 08:56 AM UTC

Hi Gopi,

Could you please create a Direct-Trac incident so that we can discuss whether or not it''''s possible for you to provide to an internal patch where these issues are resolved?

Regards,
Haneef


GJ Gopinath Jayamuni October 10, 2006 01:05 PM UTC

Hi Haneef,

Thanks for your reply. Due to some constraints we will not be able to upgrade to version 4.3 as suggested by you. Can you please give a fix/hack to this issue with Sysncfusion version 4.101.0.50.

Thanks,
Gopi


GJ Gopinath Jayamuni October 10, 2006 01:08 PM UTC

Hi Haneef,

Please ignore previous posting.

Thanks,
Gopi

Loader.
Up arrow icon