
In a grid with client-side row selection enabled by setting the clientsettings-selecting-allowrowselect property to true and adding a gridclientselectcolumn, the row selection is not working .
The style is not applied to the selected rows, on the server-side i can't see any rows as selected, and when checking the header checkbox that selects all rows, i get a javascript error 'Uncaught TypeError: Cannot call method '_selectAllRows' of null'.
The grid is inside a RadPageView, and the radmultipage is ajaxified using a RadAjaxManager. This is all placed in a .ascx file which is placed inside a sitefinity page. The master page references jquery 1.4.1, and has a RadScriptManager.
Another error i'm getting, which i don't know if is connected to this, is that each time an AJAX call is started, a resource fails to load (the url of the resource is [url of webpage]?rnd=[a date]. It might count that i'm using a custom skin built with the Visual StyleBuilder.
Any ideas about this particular problem?
Update:
I've managed to localize the problem some more. The problem is that the $find method called by the checkbox to return the grid returns null.
Now, the grid is on the third page of the RadMultiPage. I pass from one page to the other by AJAX calls, using a RadAjaxManager and a RadAjaxLoadingPanel. If i call the $find method the first time the page is loaded, it returns the right DOM object. However, if i call the same method with the same parameter (the id of the grid) after an AJAX call that updates the RadMultiPage, the $find method returns null. Note that this was working when i was using a .aspx page to hold all the content, but i wanted to add it to a Sitefinity page so i had to use a .ascx file.
Thanks
10 Answers, 1 is accepted
The information is not enough for us to identify the cause of the problem. Generally, it seems that the RadGrid client object is not initialized at the time you click on the select checkbox. If you look in the page HTML source, you should see a $create() statement for the RadGrid at the end of the source - is it there?
Sys.Application.add_init(function() {
$create(Telerik.Web.UI.RadGrid, {"ClientID":"RadGrid_Client_ID_here" ........................ }
}
Can you first check whether it is a Sitefinity-related problem by placing the user control on a regular web page outside Sitefinity?
Let us know what your findings are and send us the user control to test locally. Thank you.
Regards,
Dimo
the Telerik team

AjaxManager Settings:
<telerik:AjaxSetting AjaxControlID="GridHere">
<UpdatedControls>Uncaught TypeError: Cannot call method '_selectAllRows' of null
<telerik:AjaxUpdatedControl ControlID="GridHere" />
</UpdatedControls>
</telerik:AjaxSetting> Inside the Grid I have a command custom template:<CommandItemTemplate>It works the first time, but the next time the checkbox highlights but does not postback as selected. I noticed this javascript error in chrome:
<asp:LinkButton ID="lnkRemoveSelected" CommandName="Delete" runat="server">Remove Selected</asp:LinkButton>
</CommandItemTemplate>
(anonymous function):2
onclick
The problem seems to be because the ajax settings are not applied properly after the first ajax request. Can you please check it the suggestions from the ticket you have opened with the same issue will resolve the problem?
All the best,
Radoslav Georgiev
the Telerik team


It looks like I'm having the same problem...
Things where working with the classic telerik RadGrid. After switching to latest version of RadGrid I get the following error when clicking the 'select all rows' checkbox in the header of the grid (see attached screenshot).
Could someone please post the solution given by telerik for this problem in the ticket mentioned in this thread?
Thanks for helping!
Regards,
Tonino.
Can you please show us sample of your markup? Are you using RadAjaxManager on your pages/user controls?
Greetings,
Radoslav Georgiev
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Here the markup with the classic RadGrid:
<
radG:RadGrid
ID
=
"grid1"
runat
=
"server"
AllowMultiRowSelection
=
"True"
AllowPaging
=
"True"
AllowSorting
=
"True"
AutoGenerateColumns
=
"False"
DataSourceID
=
"sql1"
GridLines
=
"None"
Skin
=
"Dolphin"
SkinsPath
=
"~/RadControls/Grid/Skins"
Visible
=
"False"
Width
=
"100%"
EnableViewState
=
"True"
>
<
MasterTableView
DataKeyNames
=
"Ref"
DataSourceID
=
"sql1"
>
<
Columns
>
<
radG:GridClientSelectColumn
UniqueName
=
"ClientSelectColumn"
>
<
HeaderStyle
HorizontalAlign
=
"Center"
Width
=
"15px"
/>
<
ItemStyle
HorizontalAlign
=
"Center"
/>
</
radG:GridClientSelectColumn
>
<
radG:GridBoundColumn
DataField
=
"F1"
HeaderText
=
"F1"
UniqueName
=
"F1"
>
<
ItemStyle
Width
=
"90px"
/>
</
radG:GridBoundColumn
>
<
radG:GridBoundColumn
DataField
=
"F2"
HeaderText
=
"F2"
UniqueName
=
"F2"
>
<
ItemStyle
Width
=
"90px"
/>
</
radG:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
<
PagerStyle
AlwaysVisible
=
"true"
BackColor
=
"WhiteSmoke"
Height
=
"25px"
PageButtonCount
=
"15"
HorizontalAlign
=
"Left"
Mode
=
"NextPrevNumericAndAdvanced"
VerticalAlign
=
"Middle"
/>
<
ClientSettings
ApplyStylesOnClient
=
"true"
>
<
Selecting
AllowRowSelect
=
"true"
/>
<
ClientEvents
OnRowClick
=
"RowClick"
/>
</
ClientSettings
>
</
radG:RadGrid
>
And here the markup with the latest version of RadGrid:
<
telerik:RadGrid
ID
=
"grid1"
runat
=
"server"
AllowMultiRowSelection
=
"True"
AllowPaging
=
"True"
AllowSorting
=
"True"
AutoGenerateColumns
=
"False"
DataSourceID
=
"sql1"
GridLines
=
"None"
Skin
=
"Default"
Width
=
"100%"
EnableViewState
=
"True"
>
<
MasterTableView
DataKeyNames
=
"Ref"
>
<
Columns
>
<
telerik:GridClientSelectColumn
UniqueName
=
"ClientSelectColumn"
>
<
HeaderStyle
HorizontalAlign
=
"Center"
Width
=
"15px"
/>
<
ItemStyle
HorizontalAlign
=
"Center"
/>
</
telerik:GridClientSelectColumn
>
<
telerik:GridBoundColumn
DataField
=
"F1"
HeaderText
=
"F1"
SortExpression
=
"F1"
UniqueName
=
"F1"
>
<
ItemStyle
Width
=
"90px"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"F2"
HeaderText
=
"F2"
SortExpression
=
"F2"
UniqueName
=
"F2"
>
<
ItemStyle
Width
=
"90px"
/>
</
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
<
PagerStyle
AlwaysVisible
=
"true"
BackColor
=
"WhiteSmoke"
Height
=
"25px"
PageButtonCount
=
"15"
HorizontalAlign
=
"Left"
Mode
=
"NextPrevNumericAndAdvanced"
VerticalAlign
=
"Middle"
/>
<
ClientSettings
>
<
Selecting
AllowRowSelect
=
"True"
UseClientSelectColumnOnly
=
"True"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
I don't have RadAjaxManager on the page, just a classic RadAjaxPanel.
As for the problem when clicking the 'select all rows': I was hiding (visible=false) the grid on the beginning and I guess this was causing the problem. After setting visible=true and hiding the grid after page load the problem with the checkbox disappeared.
But now I noticed that the paging is not working... Changing the number of records per page has no effect. As you see I'm using NextPrevNumericAndAdvanced mode. Any idea what could be the problem? With the classic version of the RadGrid paging was working fine.
Regards,
Tonino.
Can you please try setting the PageSize property on the Grid? You can also take a look at the RadGrid Paging demos for more samples on customizing the paging.
All the best,
Radoslav Georgiev
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Setting PageSize in the ASPX did not help... PageSize ist 10, regardless if set or not set in the ASPX.
Greetings,
Tonino.
The screen shot you have attached indicates the $find("[control-id]") object is null, meaning the RadGrid client component is not successfully found. Is this call to $find originating from your custom javascript? If, so, can you see if you are properly referencing the control with its ClientID?
Veli
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.