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

Static Headers but no Static Footer

3 Answers 152 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Cleber
Top achievements
Rank 1
Cleber asked on 17 Feb 2011, 12:51 PM
Hi all,

I'm trying to reach this goal:
I have a grid with static headers, but this way RadGrid make the Footer Totals static too...
There's a way of change this behavior or should I make it programmatically, if yes, how?

Thanks
Cleber
Developer - Brasil

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 18 Feb 2011, 05:57 AM
Hello Cleber,

If you want to change the footer of grid column , try the following code snippet:

ASPX:
<telerik:RadGrid ID="RadGrid1" runat="server" ShowFooter="true" OnItemDataBound="RadGrid1_ItemDataBound">
      <MasterTableView>
          <Columns>
              <telerik:GridBoundColumn DataField="Total" HeaderText="Total" UniqueName="Total"
                  Aggregate="sum">
              </telerik:GridBoundColumn>
          </Columns>
      </MasterTableView>
 </telerik:RadGrid>

C#:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
      {
          if (e.Item is GridFooterItem)
          {
              GridFooterItem footerItem = (GridFooterItem)e.Item;
              footerItem["Total"].Text = "new footer";//changing footer
          }
    }

Thanks,
Princy.
0
Cleber
Top achievements
Rank 1
answered on 18 Feb 2011, 12:08 PM
Hi, thanks for answer,

Let me try a better explanation:

I want to let my headers statics but my footer I want inside the grid.

1) When I put the property UseStaticHeaders to true my header get static and my footers are placed in the bottom of the scroll bars.
2) When I put the property UseStaticHeaders to false my header is no more static and my footers get placed inside the grid above the scrool bars.

I want the second behavior for my grid
UseStaticHeaders = true
Headers = Statics
Footers = Inside the grid ( not below the scrool bars )

How to reach this?
Cleber
0
Pavlina
Telerik team
answered on 18 Feb 2011, 03:56 PM
Hi Cleber,

You can refer to the link below for more information on the matter:
http://www.telerik.com/community/forums/aspnet-ajax/grid/footer-with-horizontal-scrollbar.aspx

Best wishes,
Pavlina
the Telerik team
Tags
Grid
Asked by
Cleber
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Cleber
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or