Hi
I dont know if it is possible, but we are trying to use the Ajax $Find method to find a RadGrid that has been created in the code behind. Below is how we create the Rad Grid:
Following the example in the demos for detecting a row selection, we then have the following code in javascript:
Everything appears to be hooked up correctly, and the grid's Client ID is being translated to the correct name (i.e. ctl00_ContentPlaceHolder1_grdTypes), however the "grid" variable always appears to be NULL which means that we are unable to check the selected items count.
Any help would be very welcome.
Paul
I dont know if it is possible, but we are trying to use the Ajax $Find method to find a RadGrid that has been created in the code behind. Below is how we create the Rad Grid:
| Protected WithEvents grdTypes As New RadGrid |
| Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init |
| With grdTypes |
| .ID = "grdTypes" |
| .AllowSorting = True |
| .DataSourceID = "SqlDataSource" |
| .AllowAutomaticDeletes = True |
| .AllowAutomaticInserts = True |
| .AllowAutomaticUpdates = True |
| .ClientSettings.ClientEvents.OnRowSelected = "SelectRow()" |
| 'ETC |
| End With |
| End Sub |
Following the example in the demos for detecting a row selection, we then have the following code in javascript:
| <script language="javascript" type="text/javascript"> |
| function SelectRow(sender, eventArgs) { |
| var grid = $find("<%=grdTypes.ClientID %>"); |
| } |
| </script> |
Everything appears to be hooked up correctly, and the grid's Client ID is being translated to the correct name (i.e. ctl00_ContentPlaceHolder1_grdTypes), however the "grid" variable always appears to be NULL which means that we are unable to check the selected items count.
Any help would be very welcome.
Paul