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

get_clientDataKeyNames()

One-dimensional array which holds the key fields set through the ClientDataKeyNames property of GridTableView on the server. To extract the key values you can use the eventArgs.getDataKeyValue() inside any row-related client event handler of RadGrid.

You should set ClientDataKeyNames server-side in order to access the key values client-side!

Example:

    <ClientSettings>
      <ClientEvents OnHierarchyExpanded="HierarchyExpanded" />
    </ClientSettings>
    function HierarchyExpanded(sender, args)
    {  
        var firstClientDataKeyName = args.get_tableView().get_clientDataKeyNames()[0];
        alert("Item with " + firstClientDataKeyName + ":'" + args.getDataKeyValue(firstClientDataKeyName) + "' expanded.");
    }
In this article