White space appears above grid when using AJAX manager

2 posts, 0 answers
  1. drpcken
    drpcken avatar
    36 posts
    Member since:
    Feb 2007

    Posted 29 May 2009 Link to this post

    This problem has been driving me crazy.  I have a RadGrid with an Ajax Manager wired up to it.  See screenshot:
    http://i5.photobucket.com/albums/y176/drpcken/1-2.png

    Everything looks great until I sort by a column, then for no reason at all a whitespace (about 8 pixels) appears above the grid.  See screenshot:
    http://i5.photobucket.com/albums/y176/drpcken/2.png

    It seems that anytime I click on a control that is wired up to the AJAX manager this happens.  I have a button ABOVE the grid (it's not even a part of the grid) and its wired up to the Ajax Manager, when I click it I get the same behavior: a white space above the grid.  When I remove the AJAX manager it works, but of course the whole page posts back with no AJAX.  I've tried everything I can think of to fix this:  I've removed ALL CSS from the page, but I get the same problem.  I've removed the wrapper around the grid, same problem.  I've removed the loading panel, same problem.  I've removed every single server-side method and client side javascript but get the same problem.  The code for the grid:

    <div class="CensusGrid"
            <asp:Button ID="btnRefreshCustomers" runat="server" Style="display: none;"  /> 
            <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" DataSourceID="LinqDataSource1" 
                GridLines="None" Skin="WebBlue" AllowMultiRowSelection="True" AllowSorting="True" 
                OnItemDataBound="RadGrid1_ItemDataBound"
                <MasterTableView AutoGenerateColumns="false" DataKeyNames="CensusID" DataSourceID="LinqDataSource1"
                    <RowIndicatorColumn> 
                        <HeaderStyle Width="20px"></HeaderStyle> 
                    </RowIndicatorColumn> 
                    <ExpandCollapseColumn> 
                        <HeaderStyle Width="20px"></HeaderStyle> 
                    </ExpandCollapseColumn> 
                    <Columns> 
                        <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn"
                            <ItemStyle Width="27px" Wrap="false" /> 
                            <HeaderStyle Width="27px" Wrap="false" /> 
                        </telerik:GridClientSelectColumn> 
                        <telerik:GridTemplateColumn DataField="LastName" HeaderText="Name"  
                            SortExpression="LastName" UniqueName="LastName"
                            <ItemTemplate> 
                                <asp:Label ID="LastNameLabel" runat="server" Text='<%# Eval("LastName") %>'></asp:Label>,&nbsp; 
                                <asp:Label ID="FirstNameLabel" runat="server" Text='<%# Eval("FirstName") %>'></asp:Label>&nbsp; 
                                <asp:ImageButton ID="hasAccess" ImageUrl='<%# Eval("AllowClientAccess", "images/lock_{0}.png") %>' 
                                    runat="server" /> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
                        <telerik:GridBoundColumn DataField="DOB" DataType="System.DateTime" HeaderText="DOB" 
                            SortExpression="DOB" UniqueName="DOB" DataFormatString="{0:d}"
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="MaritalStatus" HeaderText="MaritalStatus" SortExpression="MaritalStatus" 
                            UniqueName="MaritalStatus"
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="AddressCity" HeaderText="AddressCity" SortExpression="AddressCity" 
                            UniqueName="AddressCity"
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="AddressState" HeaderText="AddressState" SortExpression="AddressState" 
                            UniqueName="AddressState"
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="EmailAddress" HeaderText="EmailAddress" SortExpression="EmailAddress" 
                            UniqueName="EmailAddress"
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="DateOfHire" DataType="System.DateTime" HeaderText="DateOfHire" 
                            SortExpression="DateOfHire" UniqueName="DateOfHire" DataFormatString="{0:d}"
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="JobDescription" HeaderText="JobDescription" SortExpression="JobDescription" 
                            UniqueName="JobDescription"
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="flag" UniqueName="flag" Visible="false"
                        </telerik:GridBoundColumn> 
                        <telerik:GridTemplateColumn> 
                            <ItemStyle Width="29px" Wrap="false" /> 
                            <HeaderStyle Width="29px" /> 
                            <ItemTemplate> 
                                <id="HyperLink1" runat="server" class="thickbox" title='<%# "Dependents for <b>" + Eval("FirstName") + " " + Eval("LastName") + "</b>" %>' 
                                    href='<%# Eval("censusID", "Dependents.aspx?c={0}&TB_iframe=true&height=550&width=600") %>'
                                    <asp:Image ID="Image2" runat="server" ImageUrl="images/she_users.png" ToolTip="Add/Edit Dependents" /> 
                                </a> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
                        <telerik:GridTemplateColumn> 
                            <ItemStyle Width="29px" Wrap="false" /> 
                            <HeaderStyle Width="29px" /> 
                            <ItemTemplate> 
                                <id="editUser" runat="server" class="thickbox" title='<%# "Details for <b>" + Eval("FirstName") + " " + Eval("LastName") + "</b>" %>' 
                                    href='<%# Eval("censusID", "CensusDetails.aspx?c={0}&TB_iframe=true&height=550&width=600") %>'
                                    <asp:Image ID="Image1" runat="server" ImageUrl="images/Edit.gif" ToolTip="Edit Employee" /> 
                                </a> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
                        <telerik:GridTemplateColumn> 
                            <ItemStyle Width="29px" Wrap="false" /> 
                            <HeaderStyle Width="29px" /> 
                            <ItemTemplate> 
                                 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
                    </Columns> 
                </MasterTableView> 
                <ClientSettings> 
                    <Selecting AllowRowSelect="True" EnableDragToSelectRows="False" /> 
                    <Scrolling AllowScroll="True" ScrollHeight="489px" UseStaticHeaders="True" /> 
                </ClientSettings> 
            </telerik:RadGrid> 
        </div> 
        <asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="clientBenefitDataContext" 
                OrderBy="LastName" TableName="Census" Where="ContactID == @ContactID" OnSelecting="LinqDataSource1_Selecting"
                <WhereParameters> 
                    <asp:ControlParameter ControlID="hiddenContactID" DefaultValue="0" Name="ContactID" 
                        PropertyName="Value" Type="Int32" /> 
                </WhereParameters> 
            </asp:LinqDataSource> 

    And here is my AjaxManager which is below the grid:
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="lblToggle"
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                <telerik:AjaxSetting AjaxControlID="RadGrid1"
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 

    This problem has been driving me crazy.  Does anyone see anything I don't?


  2. drpcken
    drpcken avatar
    36 posts
    Member since:
    Feb 2007

    Posted 29 May 2009 Link to this post

    Ok within seconds of posting this I figured it out.  It was the hidden button above the grid.  I moved it to the bottom of the grid and it works fine... Figures :)
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top