There are two possible means to reference the client grid object:
- Using the $find(id) method (shortcut for the findComponent() method) of the ASP.NET AJAX framework:
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> var grid = $find("<%=RadGrid1.ClientID %>"); //execute some logic here </telerik:RadCodeBlock>
- Subscribing to the OnGridCreated client-side event of the control. In its handler the sender argument (first argument passed in the handler) will reference the client grid object. For more info you can review this example from the product's QSF.
Check out this article for more examples: Get Client-side Reference to a Control Object
More info about the $find and $get shortcut methods exposed by the ASP.NET AJAX framework you can find visiting the links below: