Completed
Last Updated: 12 Aug 2015 11:19 by BiBongNet
BiBongNet
Created on: 24 Jul 2015 21:55
Category: Grid
Type: Bug Report
0
Grid - Row Selection syntax error with onclick function of checkbox
The event onclick of the checkbox to select all (inside th with class="rgHeader rgCheck") has syntax error with the function $find, which causes javascript error to the whole page in some cases (for me), and in some pages it doesn't and just can be "ignored".

This can be seen at the demo: http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/selecting/row-selection/defaultcs.aspx
This demo page is not "broken down", but Firebug reports error: TypeError: toolTip is undefined. So, ToolTips might be affected.

Function error: onclick="$find("ctl00_ContentPlaceholder1_RadGrid1")._selectAllRows("ctl00_ContentPlaceholder1_RadGrid1_ctl00", "", event);"

So, using """ (double quote) here causes error. It should be "'" (single quote) like all other functions in th with class="rgHeader" as below.

<th scope="col" class="rgHeader rgCheck">
        <input id="ctl00_ContentPlaceholder1_RadGrid1_ctl00_ctl02_ctl00_ClientSelectColumnSelectCheckBox" type="checkbox" name="ctl00$ContentPlaceholder1$RadGrid1$ctl00$ctl02$ctl00$ClientSelectColumnSelectCheckBox" onclick="$find(&quot;ctl00_ContentPlaceholder1_RadGrid1&quot;)._selectAllRows(&quot;ctl00_ContentPlaceholder1_RadGrid1_ctl00&quot;, &quot;&quot;, event);" />
    </th>
    <th scope="col" class="rgHeader">
        <a onclick="Telerik.Web.UI.Grid.Sort($find(&#39;ctl00_ContentPlaceholder1_RadGrid1_ctl00&#39;), &#39;CustomerID&#39;); return false;" title="Click here to sort" href="javascript:__doPostBack(&#39;ctl00$ContentPlaceholder1$RadGrid1$ctl00$ctl02$ctl00$ctl00&#39;,&#39;&#39;)">Customer ID</a>
    </th>
    <th scope="col" class="rgHeader">
        <a onclick="Telerik.Web.UI.Grid.Sort($find(&#39;ctl00_ContentPlaceholder1_RadGrid1_ctl00&#39;), &#39;CompanyName&#39;); return false;" title="Click here to sort" href="javascript:__doPostBack(&#39;ctl00$ContentPlaceholder1$RadGrid1$ctl00$ctl02$ctl00$ctl01&#39;,&#39;&#39;)">Company Name</a>
    </th>
    <th scope="col" class="rgHeader">
        <a onclick="Telerik.Web.UI.Grid.Sort($find(&#39;ctl00_ContentPlaceholder1_RadGrid1_ctl00&#39;), &#39;ContactName&#39;); return false;" title="Click here to sort" href="javascript:__doPostBack(&#39;ctl00$ContentPlaceholder1$RadGrid1$ctl00$ctl02$ctl00$ctl02&#39;,&#39;&#39;)">Contact Name</a>
    </th>
    <th scope="col" class="rgHeader">
        <a onclick="Telerik.Web.UI.Grid.Sort($find(&#39;ctl00_ContentPlaceholder1_RadGrid1_ctl00&#39;), &#39;ContactTitle&#39;); return false;" title="Click here to sort" href="javascript:__doPostBack(&#39;ctl00$ContentPlaceholder1$RadGrid1$ctl00$ctl02$ctl00$ctl03&#39;,&#39;&#39;)">Contact Title</a>
    </th>
    <th scope="col" class="rgHeader">
        <a onclick="Telerik.Web.UI.Grid.Sort($find(&#39;ctl00_ContentPlaceholder1_RadGrid1_ctl00&#39;), &#39;Address&#39;); return false;" title="Click here to sort" href="javascript:__doPostBack(&#39;ctl00$ContentPlaceholder1$RadGrid1$ctl00$ctl02$ctl00$ctl04&#39;,&#39;&#39;)">Address</a>
    </th>
    <th scope="col" class="rgHeader">
        <a onclick="Telerik.Web.UI.Grid.Sort($find(&#39;ctl00_ContentPlaceholder1_RadGrid1_ctl00&#39;), &#39;PostalCode&#39;); return false;" title="Click here to sort" href="javascript:__doPostBack(&#39;ctl00$ContentPlaceholder1$RadGrid1$ctl00$ctl02$ctl00$ctl05&#39;,&#39;&#39;)">Postal Code</a>
    </th>

0 comments