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

[Solved] issues with multiple grids on same page

1 Answer 20 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Murali
Top achievements
Rank 1
Murali asked on 06 Sep 2011, 06:03 PM
We have a requirement to display results from multiple tables on multiple mvc grids on the same page. The binding used is ajax binding. Each of the grid's div contains 2 hidden columns each containing the respective table id and the count of columns in the table.
When one of the rows in either of the results grid is double clicked, we need to perfom an action based on the respectiive table id and colum count.  When i try to access the value of the hidden column I always get the value from the first div. how do i acess value of each hidden column from each div based on the row of the div that is clicked?
Regards,
Murali

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 07 Sep 2011, 06:34 AM
Hi Murali,

Please make sure that all Grids on the page have unique Name()'s and that you have not hard-coded any client IDs in the Javascript click handlers (if all the Grids use common handler functions).

Generally, you can retrieve a dataItem value from a given Grid row by using the dataItem() method:

http://www.telerik.com/help/aspnet-mvc/telerik-ui-components-grid-client-api-and-events.html#dataItem

Greetings,
Dimo
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Grid
Asked by
Murali
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or