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

Retrieve selected rows with ClientDataKeyNames

1 Answer 144 Views
Grid
This is a migrated thread and some comments may be shown as answers.
RB
Top achievements
Rank 1
RB asked on 10 Jun 2014, 07:37 PM
I have a RadGrid with multiple row selection enabled.How can I find out the ClientDataKeyValues of the rows selected?
I have the following till now:

this._RadGrid1.ClientSettings.ClientEvents.OnRowSelected = "OnRowSelected";
The javascript(which does :
function OnRowSelected(sender, args) {
    var grid = args.get_tableView();
    var selectedRows = grid.get_selectedItems();
    for (var i = 0; i < selectedRows.length; i++) {
        var row = selectedRows[i];       
    }   
}
Please let me know how can get all selected ClientDataKeyValues .

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 11 Jun 2014, 07:16 AM
Hi,

Please try the below JavaScript to access the ClientDataKeyNames of a selected row.

JavaScript:
row.getDataKeyValue("OrderID");

Let me know if you have any concern.
Thanks,
Shinu.
Tags
Grid
Asked by
RB
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or