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

Getting RadGrid Client Object

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 
  • 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.

Additionally, to get reference to the div wrapper or the * html table element * rendered by the RadGrid instance, you can use the $get(id) method (shortcut for the document.getElementById() javascript method).

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:

In this article