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

[Solved] RadGrid DetailTable Pager Style

1 Answer 281 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 09 Jul 2009, 06:26 PM
I have the newest version on the ASP.NET AJAX controls, and I think I may have found an issue.  I have a RadGrid, that uses internal DetailTables to display additional information, and when the pager is displayed, the styles for the pager seem to be ignored.

Here is my code for the radgrid, I fill up the table(s) on the backend, and the paging and everthing works, but the pager style doesn't work at all for the DetailTables dataset.
<telerik:RadGrid  
 ID="gridSearchResults"  
 runat="server" 
 GridLines="None"  
 Width="100%" 
 EnableAjax="true"  
 EnableViewState="true" 
 AllowPaging="True"  
 AllowCustomPaging="True"  
 AllowSorting="True"  
 AutoGenerateColumns="False" 
 CssClass="NoPadding"  
 OnNeedDataSource="gridSearchResults_NeedDataSource" 
 OnItemDataBound="gridSearchResults_ItemDataBound"  
 OnDetailTableDataBind="gridSearchResults_DetailTableDataBind" 
 PageSize="10"
    <HeaderContextMenu EnableTheming="True"
        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
    </HeaderContextMenu> 
    <ClientSettings  AllowColumnsReorder="False" ReorderColumnsOnClient="False"
        <Scrolling AllowScroll="false" UseStaticHeaders="True" /> 
        <Resizing  
            AllowRowResize="False" 
            EnableRealTimeResize="True" 
            ResizeGridOnColumnResize="False" 
            AllowColumnResize="True"></Resizing> 
        <Selecting AllowRowSelect="True"></Selecting> 
    </ClientSettings> 
    <MasterTableView  
        ShowFooter="False"  
        Width="100%"  
        TableLayout="Fixed" 
        DataKeyNames="Type"
            <DetailTables> 
                <telerik:GridTableView runat="server"  
                   DataKeyNames="Number" 
                   Name="Objects" 
                   Width="100%"  
                   AllowCustomPaging="true" 
                   PageSize="10"
                   <Columns> 
                      <telerik:GridTemplateColumn 
                          UniqueName="NameColumn" 
                          SortExpression="Name" 
                          HeaderText="Name"
                          <HeaderStyle Width="165px" /> 
                          <ItemTemplate> 
                              <asp:HyperLink ID="hlSelectLink" runat="server"  
                                  NavigateUrl="SomePage.aspx"  
                                  Style="font-family: Tahoma; font-size: 11px;" 
                                  Text='<%# Eval("Name") %>'></asp:HyperLink> 
                          </ItemTemplate> 
                      </telerik:GridTemplateColumn> 
                      <telerik:GridBoundColumn  
                          DataField="DateCreated"  
                          DataType="System.DateTime"  
                          HeaderText="Date Created" 
                          SortExpression="DateCreated" 
                          UniqueName="DateCreated"
                      </telerik:GridBoundColumn> 
                      <telerik:GridBoundColumn  
                          DataField="Status" 
                          HeaderText="Status"  
                          SortExpression="Status" 
                          UniqueName="Status"
                      </telerik:GridBoundColumn> 
                  </Columns> 
                  <PagerStyle Mode="NextPrevAndNumeric"/> 
              </telerik:GridTableView> 
         </DetailTables> 
         <Columns> 
             <telerik:GridBoundColumn 
                 DataField="ObjectType"  
                 HeaderText="Object Type" 
                 SortExpression="ObjectType" 
                 UniqueName="ObjectType"
              </telerik:GridBoundColumn> 
              <telerik:GridBoundColumn 
                  DataField="TotalNumberOfObjects" 
                  HeaderText="Total Objects"  
                  SortExpression="TotalNumberOfObjects" 
                  UniqueName="TotalNumberOfObjects"
              </telerik:GridBoundColumn> 
          </Columns> 
          <RowIndicatorColumn> 
              <HeaderStyle Width="20px"></HeaderStyle> 
          </RowIndicatorColumn> 
          <PagerStyle Mode="NextPrevAndNumeric" /> 
          <ExpandCollapseColumn> 
              <HeaderStyle Width="20px"></HeaderStyle> 
          </ExpandCollapseColumn> 
          <NoRecordsTemplate> 
              No Rows were returned 
          </NoRecordsTemplate> 
      </MasterTableView> 
      <FilterMenu EnableTheming="True"
          <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
      </FilterMenu> 
  </telerik:RadGrid> 

On all other grids the pager looks correct, just not when displaed in a DetailTables.  I am using version 2009.2.701.20 of the controls.

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 13 Jul 2009, 12:23 PM
Hi Ryan,

This is an expected behavior for RadGrid, as RadGrid's detail tables ignore the ingerited parent pager style if you have explicitly set any of the PagerStyle properties for the particular nested table. Therefore, you can either set the PagerStyle properties of the uppermost RadGrid object only, or for every detail table where you set PagerStyle properties, you set CssClass="rgPager".

Regards,
Veli
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Ryan
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or