New to Telerik UI for ASP.NET AJAX? Download free 30-day trial


A collection of all selected items (of type GridDataItem) for the respective GridTableView instance. Can be used to traverse the selected items and get corresponding values.

<telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" runat="server" AllowPaging="True"
    OnNeedDataSource="RadGrid1_NeedDataSource" AllowMultiRowSelection="true">
        <Selecting AllowRowSelect="true" />
    <MasterTableView DataKeyNames="OrderID" ClientDataKeyNames="OrderID">
            <telerik:GridClientSelectColumn UniqueName="SelectColumnName">
<br />
<asp:Button ID="Button1" runat="server" Text="Click"
    OnClientClick="buttonClick(); return false;" />
<br />
<span id="output"></span>
function buttonClick() {
    var grid = $find('<%= RadGrid1.ClientID %>');
    var masterTableView = grid.get_masterTableView();

    var selectedItems = masterTableView.get_selectedItems();
    var result = "";

    for (var i = 0; i < selectedItems.length; i++) {
        var item = selectedItems[i];

        var dataKeyValue = item.getDataKeyValue("OrderID");
        var cellValue = $(item.get_cell("ShipCountry")).text();

        result = result + ("Order " + dataKeyValue +
           " was registered from " + cellValue + ".<br/>");
In this article
Not finding the help you need? Improve this article