I love the look of the mobile version of radgrid paging so I want to use it regardless if the client is on a desktop. I don't want to use the "auto" render mode.
In the header I have the following Javascript which works correctly if RenderMode=Mobile is NOT set:
<
script
type
=
"text/javascript"
>
function CheckAll(checkAllBox, checkboxName, allcheckboxName) {
//var frm = document.form1;
var frm = document.getElementById('form1');
var ChkState = checkAllBox.checked;
for (i = 0; i <
frm.length
; i++) {
e
=
frm
.elements[i];
if (e.type == 'checkbox' && e.name.indexOf(checkboxName) != -1)
e.checked
=
ChkState
;
}
}
</script>
A simple radgrid I created on a new webform clean of any of my own javascript and css:
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
Runat
=
"server"
></
telerik:RadScriptManager
>
<
telerik:RadGrid
BorderStyle
=
"None"
Width
=
"100%"
ID
=
"dgrTestGrid"
runat
=
"server"
AllowPaging
=
"True"
AllowSorting
=
"True"
AutoGenerateColumns
=
"False"
GridLines
=
"None"
PageSize
=
"20"
RenderMode
=
"Mobile"
>
<
pagerStyle
Mode
=
"NextPrevNumericAndAdvanced"
/>
<
MastertableView
EnableNoRecordsTemplate
=
"True"
>
<
Columns
>
<
telerik:GridTemplateColumn
UniqueName
=
"TemplateColumn"
>
<
ItemStyle
HorizontalAlign
=
"Center"
CssClass
=
"TableBodyLight"
></
ItemStyle
>
<
HeaderTemplate
>
<
asp:CheckBox
ID
=
"ckbSelectAll"
runat
=
"server"
/>
</
HeaderTemplate
>
<
ItemTemplate
>
<
asp:CheckBox
ID
=
"ckbSelect"
runat
=
"server"
/>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
<
NoRecordsTemplate
>
<
div
class
=
"NoRecords"
>You have no Records.</
div
>
</
NoRecordsTemplate
>
</
MastertableView
>
</
telerik:RadGrid
>
Bind your own data to this and you'll see what I mean. You can't check the checkbox in the header (you can but it doesn't toggle the checkboxes in the rows).
Any suggestions on how to set the pager to be mobile and have the check all functionality (without ajax.. I want it to be client side) other than just recreating the look with a custom pager or going with a simple ASP datagrid (which defeats the purpose of me using Radcontrols in the first place).