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

Grid Expands past the end of table on View All

2 Answers 58 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Julian
Top achievements
Rank 1
Julian asked on 17 Mar 2009, 03:15 PM
I have a RadGrid that is within a contentPlaceHolder. In the master page I define a footer to appear after the contentplaceholder. This seems to work fine until someone clicks the "View All" functioinality in the RadGrid. This causes the grid to expand past the end of the contentPlaceholder.

Here is the majority of the code in the Master Page. Notice the pagefooter control.

<body> 
        <form id="mainMasterForm" runat="server"
            <atk:ToolkitScriptManager ID="mainScriptManager" runat="Server"/> 
            <div class="panel"
                <div class="headerPanel"
                    <table border="0" cellpadding="0" cellspacing="0" width="100%"
                        <tr> 
                            <td rowspan="3" align="left"
                                <asp:Image ID="vertexLogo" AlternateText="VertexLogo" ImageUrl="~/App_Themes/VertexDefault/Images/VertexLogo202x80.png" runat="server" /> 
                            </td> 
                            <td align="left" class="boldText" > 
                                <asp:Label ID="userFullNameLabel" runat="Server" /> 
                            </td> 
                            <td align="right" class="boldText"
                                <asp:Label ID="currentDateLabel" runat="Server" /> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td align="left" class="boldText"
                                <asp:Label ID="customerNameLabel" runat="server" />&nbsp;&nbsp; 
                                <asp:Label ID="filingEntityLabel" runat="server" /> 
                            </td> 
                            <td align="right"
                                <asp:HyperLink ID="logoutLink" NavigateUrl="~/Common/Logout.aspx" Text="[Log Out]" runat="server" /> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td valign="bottom" colspan="2" style="width:630px"
                                <asp:Menu ID="mainMenu" runat="server" StaticDisplayLevels="1" StaticEnableDefaultPopOutImage="false"  
                                    Orientation="Horizontal" StaticSubMenuIndent="0px"
                                    <StaticMenuStyle CssClass="menuHeaderStyle" /> 
                                    <DynamicMenuItemStyle CssClass="menuStyle" /> 
                                    <DynamicHoverStyle CssClass="menuStyle" /> 
                                </asp:Menu> 
                            </td> 
                        </tr> 
                    </table> 
                </div> 
                <div class="content"
                    <br /> 
                    <asp:ContentPlaceHolder ID="mainContentPlaceHolder" runat="server" /> 
                </div> 
            </div> 
            <vtx:MessageBox ID="messageBoxControl" runat="server" /> 
            <vtx:PageFooter ID="vertexFooter" runat="server" /> 
        </form> 
    </body> 

Here is the apsx code that has the actual RadGrid.

<asp:Content ID="viewActivityLogContent" ContentPlaceHolderID="mainContentPlaceHolder" runat="server"
    <h1>View Activity Logs</h1> 
    <br /> 
    <asp:Image ID="horizBar" AlternateText="Horizontal Bar" ImageUrl="~/App_Themes/VertexDefault/Images/HorizontalBar860x5.png" runat="server"/> 
    <table border="0" cellpadding="4" cellspacing="0" width="90%" class="dataEntry_Table"
        <tr class="dataEntry_TableHeader"
            <td colspan="5">&nbsp;Search Parameters</td> 
        </tr> 
        <tr> 
            <td align="left" style="width:18%">&nbsp;Date Range:</td> 
            <td align="left" style="width:18%"><rad:RadDatePicker id="dateFromDatePicker" AutoPostBack="false" Width="140px" runat="server" /></td
            <td align="left" >to</td> 
            <td align="left"><rad:RadDatePicker ID="dateToDatePicker" AutoPostBack="false" Width="140px" runat="server" /></td
            <td>&nbsp;</td> 
        </tr> 
        <tr> 
            <td align="left">&nbsp;Filter activity list by:</td> 
            <td align="left"
                <asp:DropDownList ID="activityListFilterDDL" AutoPostBack="false"  Width="140px" runat="server"
                    <asp:ListItem Text="Customer Number" Value="1" /> 
                    <asp:ListItem Text="Customer Name" Value="2" /> 
                </asp:DropDownList> 
            </td> 
            <td align="left" colspan="2"
                <asp:TextBox ID="activityFilterTextBox" Width="180px" runat="server" /> 
            </td> 
            <td align="left"
                <asp:Button ID="searchButton" Text="Search" OnClick="searchButton_Click" runat="server" /> 
                <asp:Button ID="clearButton" Text="Clear" OnClick="clearButton_Click" runat="server" /> 
                <asp:Button ID="pdfExportButton" Text="Download Log File" OnClick="pdfExportButton_Click" runat="server" /> 
            </td> 
        </tr> 
    </table> 
    <table border="0" cellpadding="0" cellspacing="0" width="90%" > 
        <tr> 
            <td align="center" colspan="4"
                <rad:RadGrid ID="activityLogListRadGrid" AllowPaging="True" AllowSorting="true" GridLines="Horizontal" HorizontalAlign="Center" ShowFooter="true" ShowStatusBar="true"  
                    EnableAJAX="True" EnableAJAXLoadingTemplate="True" LoadingTemplateTransparency="25" Skin="Grid" SkinsPath="~/App_Themes/VertexDefault"  
                    PageSize="16" AutoGenerateColumns="False" OnItemDataBound="activityLogListRadGrid_ItemDataBound" OnSortCommand="activityLogListRadGrid_SortCommand"  
                    OnNeedDataSource="activityLogListRadGrid_NeedDataSource" OnItemCommand="activityLogListRadGrid_ItemCommand" runat="server" > 
                    <SortingSettings SortToolTip="Click to sort" /> 
                    <ExportSettings IgnorePaging="true" OpenInNewWindow="true"
                        <Pdf AllowAdd="false" AllowCopy="true" AllowModify="true" AllowPrinting="true" Author="Anonymous" 
                        Keywords="None" PageWidth="1000" PageBottomMargin="1in" PageLeftMargin="1in" PageRightMargin="1in" PageTopMargin="1in" PageTitle="Activity Log Detail" 
                        Subject="RadGrid Export" Title="Activity Log Detail" PaperSize="Letter" /> 
                    </ExportSettings> 
                    <PagerStyle AlwaysVisible="true" Height="25px" Mode="NumericPages" Position="Bottom" /> 
                    <MasterTableView DataKeyNames="CustomerID,CreateUserID,CreateDateTime" TableLayout="Auto" AllowNaturalSort="false" Style="border: 0px solid #eaf2fd;" BorderColor="Black"
                        <SortExpressions> 
                            <rad:GridSortExpression FieldName="CreateDateTime" SortOrder="Ascending" /> 
                        </SortExpressions> 
                        <Columns> 
                            <rad:GridBoundColumn HeaderStyle-Width="200px" DataField="CreateDateTime" HeaderText="Activity Date" SortExpression="CreateDateTime" 
                                    UniqueName="CreateDateTime" DataFormatString="{0:MM/dd/yyyy hh:mm:ss}" ItemStyle-Wrap="False" /> 
                            <rad:GridHyperLinkColumn HeaderStyle-Width="200px" DataTextField="EventName" DataNavigateUrlFields="EventID" 
                                    DataNavigateUrlFormatString="~\Returns\ActivityLogDetail.aspx?EventID={0}" HeaderText="Event Name" SortExpression="EventName" UniqueName="EventName" /> 
                            <rad:GridBoundColumn HeaderStyle-Width="225px" DataField="LastNameFirstName" HeaderText="User" SortExpression="LastNameFirstName"  
                                    UniqueName="LastNameFirstName" ItemStyle-Wrap="False" /> 
                            <rad:GridHyperLinkColumn HeaderStyle-Width="215px" DataTextField="CustomerName" DataNavigateUrlFields="EventID" 
                                    DataNavigateUrlFormatString="~\Returns\ActivityLogDetail.aspx?EventID={0}" HeaderText="Customer" SortExpression="CustomerName" UniqueName="CustomerName" /> 
                        </Columns> 
                        <PagerTemplate> 
                            <vtx:GridPager ID="gridPagerControl" runat="server" /> 
                        </PagerTemplate> 
                    </MasterTableView> 
                </rad:RadGrid> 
                <input type="hidden" id="userContextMenuAction" name="userContextMenuAction" runat="server"/> 
            </td> 
        </tr> 
    </table> 
</asp:Content> 

I just need the footer to remain at the bottom of the grid when "View All" is clicked.


[EDIT] After looking at this a little more I simply need to do a full postback. So how can I trap the View All event and trigger a full postback? That should solve this issue.

Thanks,

julian


2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 18 Mar 2009, 08:24 AM
Hi Julian,

I am not sure whether the' View All' is CheckBox or button. If it is a CheckBox you need to set the AutoPostBack property of the CheckBox to true so that it will fire the CheckChanged event of the CheckBox.

Also try putting a <br/> just before PageFooter and see whether the footer remains at the bottom when 'ViewAll ' is clicked.

ASPX:

   <
br /> 
  <vtx:PageFooter ID="vertexFooter" runat="server" />  


Princy
0
Julian
Top achievements
Rank 1
answered on 19 Mar 2009, 01:54 PM
Thank you for the response. The view all is a link button that sits within a control that is the footer control placed at the end of the grid. I tried adding AutoPostBack="true" on the link button but they does not help.


Tags
Grid
Asked by
Julian
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Julian
Top achievements
Rank 1
Share this question
or