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

[Solved] RadGrid retrieve row original data source index @ client-side

1 Answer 187 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Grendizer
Top achievements
Rank 1
Grendizer asked on 05 Oct 2009, 01:42 PM
Hello,

I need to retrieve the currently selected row index from the data source point of view.

I have grouped/sorted grid, and I need to know the selected row data source index in order to compute some action on this row.
This should be done 100% client-side, in order then to send a request to the valid data row index.

I just met the "GridClientDeleteColumn" that seems to use this kind of information to delete the proper row on the data source. I didn't got time to test it in grouped or sorted context in order to see if this control works properly but I hope so :)

Unfortunately my use case is different and I can't use this control, but need to handle it manually using the data source row index.

Any clue on how to get this original data index from client-side code ?!

Thanks in advance for your answer.

Regards.

Seb.

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 08 Oct 2009, 07:24 AM
Hello Grendizer,

Basically, one possible option in this case would be to use an additional field, which need not be displayed, which would contain the actual index of the datarow. This field can then be accessed on the client. The field can be populated from an actual DataField in the underlying database, as a normal field, or manually. At any rate, it can be accessed on the client, to facilitate the logic which you mentioned.
I hope this information helps.

Sincerely yours,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Grendizer
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or