This is a migrated thread and some comments may be shown as answers.

Edit selects wrong row

1 Answer 34 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ben
Top achievements
Rank 1
Ben asked on 17 May 2010, 08:26 PM
This issue occurs occasionally, not always, so before I post code, here's the essence of the issue:
   I have a RadGrid displaying customer name and address data.  If I filter by address ("Starts With"), and attempt to edit one of the filtered rows, I might find myself editing the next row in the table instead of the one I clicked on.
   Some information that might be related:
   - the most recent occurrence happened when the two customers (the one I clicked on and the one for whom I was presented the edit control) both had the same name.  I had filtered by address, "starts with", on the first three characters of the address.
   - the two customers in this case were the next to last and last on the page (the grid is set to page, not scroll through the entire dataset)
   - on subsequent refreshes of the page, the order in which these two customers were presented changes.  Their addresses are different, but the first three characters (my filter criteria) were the same.
   - when debugging, I could see that in the ItemCommand event, e.Item.ItemIndex was pointing to the fourth row (the one I intended to change), but e.Item.OwnerTableView.DataKeyValues[e.Item.Index][" my customer key as defined for the grid "] was giving me the ID of the fifth row - the row it gave me to edit.

   Has anyone else seen this and is there a solution?  I can post code if necessary.
      Ben

1 Answer, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 19 May 2010, 11:37 AM
Hello Ben,

The described issue is very strange. We have not encountered it so far and we are not sure what could be the reason for experiencing the problem. Could you please post the RadGrid declaration and code behind or  send us a simple running project demonstrating the problem.  You could open a formal support ticket from your Telerik account and attach a ZIP file there. In that way we can reproduce and pinpoint the problems you're facing on our side and provide a solution.

Kind regards,
Radoslav
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Ben
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Share this question
or