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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Issue deleting last row from Grouping DataGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

49929 Sep 29,2006 03:31 PM UTC Oct 10,2006 01:08 PM UTC WinForms 16
loading
Tags: GridControl
Gopinath Jayamuni
Asked On September 29, 2006 03:31 PM UTC

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

Administrator [Syncfusion]
Replied On 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

Gopinath Jayamuni
Replied On 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

Administrator [Syncfusion]
Replied On 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

Gopinath Jayamuni
Replied On 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

Administrator [Syncfusion]
Replied On 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

Gopinath Jayamuni
Replied On 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

Administrator [Syncfusion]
Replied On 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

Gopinath Jayamuni
Replied On 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

Gopinath Jayamuni
Replied On 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

Gopinath Jayamuni
Replied On 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

Gopinath Jayamuni
Replied On 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

Gopinath Jayamuni
Replied On 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

Gopinath Jayamuni
Replied On 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

Administrator [Syncfusion]
Replied On 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

Gopinath Jayamuni
Replied On 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

Gopinath Jayamuni
Replied On October 10, 2006 01:08 PM UTC

Hi Haneef,

Please ignore previous posting.

Thanks,
Gopi

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;