.indentRight {padding-right:20px} <telerik:GridBoundColumn DataField="TaskStdHours" HeaderText="Std Hours" ReadOnly="true" SortExpression="TaskStdHours" DataFormatString="{0:F2}"><br> <HeaderStyle Width="70px" HorizontalAlign="Center" /><br> <ItemStyle HorizontalAlign="Right" CssClass="indentRight" /><br> </telerik:GridBoundColumn><br>
Hi all,
I need to do some backend tasks when the user clicks the 'Select All'-Checkbox at the top of my grid. I followed this approach and it works fine: http://www.telerik.com/community/forums/aspnet-ajax/grid/gridclientselectcolumn-select-all.aspx#1469954
In the backend I then select ALL documents on ALL pages. I go to page 2 and all documents are selected as expected. But then I want to deselect all, and this does not work, because the deselect-click is not recognized on first try. Then you have to select all again and then deselect, on the second try it works fine.
I think the problem is caused by the auto-checked 'Select all'-Checkbox if all docs on current page are selected:
So the problem is in step 5. I guess this is because by default the 'Select all' is not checked, but after all docs are displayed and the grid notices that all are checked, the 'Select all' is also checked automatically, but without notifying the backend handler. So when I uncheck the 'Select all' checkbox (step 5), the handler does not fire because the checkbox is 'still unchecked' (as the backend did not know that the grid checked the 'select all' checkbox in the meantime).
Might this be the reason? And if so, is there a workaround somehow? For example by disabling the 'Select all' checkbox to be checked if all docs on the page are checked? I've read in another posting that this is the expected behaviour but maybe there is chance to remote it?
Many thanks in advance!

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title> <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" /> <link href="Styles/ServiceRequestStyle.css" rel="Stylesheet" type="text/css" /> <link href="Styles/Default.css" rel="Stylesheet" type="text/css" /></head><body> <form id="form1" runat="server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> <Scripts> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" /> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" /> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" /> </Scripts> </telerik:RadScriptManager> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="ArticleGrid"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="ArticleGrid" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="ArticleGrid"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="ArticleImage" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <div id="rootContainer" > <div id="selectionContainer"> <asp:TextBox ID="ArticleFilterTb" runat="server" AutoPostBack="true" OnTextChanged="ArticleFilterTb_TextChanged"/> <telerik:RadGrid ID="ArticleGrid" runat="server" AutoGenerateColumns="false" AllowPaging="True" Height="350px" Width="500px" OnSelectedIndexChanged="ArticleGrid_SelectedIndexChanged"> <PagerStyle Mode="NextPrevAndNumeric" EnableSEOPaging="True"/> <MasterTableView> <Columns> <telerik:GridImageColumn DataType="System.String" UniqueName="Picture" DataImageUrlFields="PicturePath" ImageHeight="50px" HeaderStyle-Width="65px" /> <telerik:GridBoundColumn DataField="DisplayName" /> <telerik:GridBoundColumn DataField="PrimaryKey" /> </Columns> </MasterTableView> <ClientSettings EnablePostBackOnRowClick="true"> <Selecting AllowRowSelect="true" /> <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true" /> </ClientSettings> </telerik:RadGrid> </div> <div id="detailsContainer"> <asp:Image ID="ArticleImage" runat="server" Height="150px" ImageUrl="D:\Bibliotheken\Bilder\Logo_Spiral_Tribe.png" /> </div> </div> </form></body></html>