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

Random record opens in edit mode

2 Answers 68 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Parth
Top achievements
Rank 1
Parth asked on 01 Feb 2011, 09:23 PM
Hello,

I have a grid which has around 2000 records in it. When I click on edit to edit the row it opens the random record in the edit mode. I mean if I click on a row with id=5 it opens some other record with different id. I don't know how to solve this issue. I have 2 databases (one for development and one for production) and they both are 100% same. The grid works fine when I use development database but it acts weird when I use the production database. I don't know whether this issue was already there or it is something new. 

Any help will be appreciated.

thanks,
Parth

2 Answers, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 03 Feb 2011, 02:41 PM
Hello Parth,

This is indeed strange behavior for RadGrid. You can check again to see whether the grid binding is correctly configured as shown in this demo. Additionally you can examine the configuration for the two databases to verify whether there are some differences in the settings regardless of the data. Also we will appreciate if you provide some more information on the scenario as to what type of datasource and database you use, how and when you perform the binding for the grid and whether you perform any other operations with the data like sorting, grouping, filtering prior to going in edit mode. Ideally it will be best if you can provide a working project or a code sample that reproduces the issue.

All the best,
Marin
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Parth
Top achievements
Rank 1
answered on 03 Feb 2011, 08:37 PM
Hello,

I found that the records in the grid comes in different order every time I refresh the grid. So I ran the proc in the database and I found that the database returns the record in the different order every time it runs. So whenever I click a record from the grid, it gets the new dataset from the database changing the order of the records.

The grid functions perfectly fine while I use the order by clause in the proc otherwise it starts acting weird and it does not return the same order of records on each execution of the proc. So this is something from the Sql server side and not from the telerik controls. 

But the temporary solution is to use order by in the proc.

Thanks,
Parth
Tags
Grid
Asked by
Parth
Top achievements
Rank 1
Answers by
Marin
Telerik team
Parth
Top achievements
Rank 1
Share this question
or