This is a migrated thread and some comments may be shown as answers.

Unexpected White Space

2 Answers 78 Views
Grid
This is a migrated thread and some comments may be shown as answers.
JustinWong
Top achievements
Rank 1
JustinWong asked on 06 Jan 2009, 01:21 AM

Hi:

I have a Grid displayed within a RadWindow.  White space is showing between the Item portion of the MasterTable and the Footer portion.  I've never seen this before and am a bit surprised.  The codes on the aspx page (hosted within the radWindow) is quite simple. Here is the main portion of it:

 

    <div id="ContentArea">  
        <table border="0" cellpadding="0" cellspacing="0" style="background-color:white;width:740px;">  
            <tr> 
                <td class="SectionHdr" style="width:640px;">  
                    <asp:Label ID="LblHeader" Text="Viewing Question Template Report Levels:" runat="server"></asp:Label> 
                </td> 
                <td style="width:100px;padding-left:10px;padding-top:2px;padding-bottom:5px;padding-right:10px;text-align:right;vertical-align:top;">  
                    <asp:LinkButton ID="LnkBtnDone" Visible="false" Font-Size="10pt" Text="Done" OnClick="LnkBtnDone_Clicked" runat="server" /> 
                </td> 
            </tr> 
        </table> 
        <table cellpadding="0" cellspacing="0" border="0" style="width:740px;">  
            <tr> 
                <td style="padding-top:10px;padding-left:5px;padding-right:5px;text-align:center;vertical-align:top;width:100%;">  
                    <telerik:RadGrid   
                        id="RdG"   
                        Width="360px" 
                        AllowMultiRowSelection="false" 
                        OnNeedDataSource="RdG_NeedDataSource"   
                        OnItemDataBound="RdG_ItemDataBound" 
                        OnPreRender="RdG_PreRender"   
                        AllowPaging="false" 
                        AllowSorting="false" 
                        Height="450px" 
                        ShowStatusBar="false" 
                        ShowFooter="true" 
                        AutoGenerateColumns="false" 
                        Skin="WebBlue" 
                        runat="server">  
                        <ClientSettings ReorderColumnsOnClient="false"   
                            AllowDragToGroup="false" 
                            EnablePostBackOnRowClick="false" 
                            AllowColumnsReorder="false">  
                            <Scrolling AllowScroll="true"   
                                UseStaticHeaders="true" 
                                SaveScrollPosition="true" 
                                ScrollHeight="450px" /> 
                        <ClientEvents OnGridCreated="GetRdGGrid" /> 
                        </ClientSettings> 
                        <MasterTableView  
                            DataKeyNames="TJCommFYr_RowID, TSFYrRowID, TJFYrQTmplt_RowID, ADate, QTCode, OTypeSpecified" 
                            AutoGenerateColumns="False" 
                            AllowMultiColumnSorting="False"   
                            GridLines="Vertical"   
                            TableLayout="Fixed" 
                            width="345px" CommandItemDisplay="None" 
                            EnableNoRecordsTemplate="true" 
                            EditMode="InPlace" 
                            Name="MainGrid">  
                            <NoRecordsTemplate> 
                                <div>No records found.</div> 
                            </NoRecordsTemplate> 
                            <Columns> 
                                <telerik:GridEditCommandColumn   
                                ButtonType="ImageButton" 
                                UniqueName="EditCommandColumn">  
                                <HeaderStyle Width="10%" HorizontalAlign="Left" /> 
                                <ItemStyle Width="10%" HorizontalAlign="Left" CssClass="MyImageButton" /> 
                                </telerik:GridEditCommandColumn> 
                                <telerik:GridTemplateColumn UniqueName="TColADate" SortExpression="TJCommFYrASource_ADate" HeaderText="Dates">  
                                    <HeaderStyle Width="70%" HorizontalAlign="Left"></HeaderStyle>   
                                    <ItemStyle Width="70%" HorizontalAlign="Left" VerticalAlign="Top" /> 
                                    <FooterStyle Width="70%" HorizontalAlign="Left" VerticalAlign="Top" /> 
                                    <ItemTemplate> 
                                        <asp:Label ID="LblADate" Text='<%# Eval("ADate") %>' runat="server"></asp:Label> 
                                    </ItemTemplate> 
                                    <EditItemTemplate> 
                                        <asp:TextBox ID="TB_ADate" Text='<%# Bind("ADate") %>' MaxLength="8" runat="server"></asp:TextBox> 
                                    </EditItemTemplate> 
                                    <FooterTemplate> 
                                        <asp:TextBox ID="TB_ADate_New" MaxLength="8" runat="server"></asp:TextBox> 
                                    </FooterTemplate> 
                                </telerik:GridTemplateColumn> 
                                 <telerik:GridTemplateColumn UniqueName="TColQTmpltAction">  
                                    <HeaderStyle Width="20%" HorizontalAlign="center"></HeaderStyle>   
                                    <ItemStyle Width="20%" HorizontalAlign="center" /> 
                                    <FooterStyle Width="20%" HorizontalAlign="center" /> 
                                    <HeaderTemplate> 
                                        Actions  
                                    </HeaderTemplate> 
                                    <ItemTemplate> 
                                        <asp:ImageButton ID="ImgBtn_Update"   
                                            ImageUrl="../Images/Save.png" 
                                            OnCommand="Update_ASource"    
                                            CommandName="CmdUpdateASource" 
                                            CommandArgument='<%# Eval("TJFYrQTmplt_RowID")%>'   
                                            AlternateText="Update"   
                                            runat="server" /> 
                                        &nbsp;&nbsp;&nbsp;&nbsp;  
                                        <asp:ImageButton ID="ImgBtn_Delete"   
                                            ImageUrl="../Images/Delete.png" 
                                            OnCommand="Delete_ASource" 
                                            CommandName = "CmdDeleteASource" 
                                            CommandArgument='<%# Eval("TJFYrQTmplt_RowID")%>'   
                                            AlternateText="Update"   
                                            runat="server" /> 
                                    </ItemTemplate> 
                                    <FooterTemplate> 
                                        <asp:ImageButton ID="ImgBtn_Add"   
                                            ImageUrl="../Images/Add.png" 
                                            CommandName = "CmdAddNewASource" 
                                            OnCommand="AddNew_ASource"   
                                            AlternateText="Add"   
                                            runat="server" /> 
                                    </FooterTemplate> 
                                </telerik:GridTemplateColumn> 
                            </Columns> 
                        </MasterTableView> 
                    </telerik:RadGrid> 
                </td> 
            </tr> 
        </table> 
    </div> 
 

I would like to post a picture of how the grid is displayed. But unfortunately, I can't seem to find a mechanism to paste a picture to a thread within this forum.  I'm hoping that others may have experienced similar issue and could lend me a hand on how to get rid of the white space. . . .

Thanks.



 

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 06 Jan 2009, 07:56 AM
Hi Justin,

I hope the white space issue is happening within the Grid contents and its footer in the design. I also faced the same problem. Adjusting the Grid Height and ScrollHeight solved the issue.

Shinu

0
JustinWong
Top achievements
Rank 1
answered on 06 Jan 2009, 11:22 PM

Thanks Shinu:

 

Adjusting the Scrollheight did resolve the problem.  It's the inconsistency that bugs me a bit, though.  Up until this incident, if I set the Grid Height and/or Schoolheight to 'higher' than the number of records there are to fill the space, the background color of the cssClass I use will nevertheless extends all the way to the footer, giving it a continuous look.  I don't know why it failed to do so this time.

I've used ONLY the built-in WebBlue class and I haven't changed anything in the class file, so I'm not sure why this happens all of a sudden. . .

Tags
Grid
Asked by
JustinWong
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
JustinWong
Top achievements
Rank 1
Share this question
or