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

Double footer on grid, possible ?

1 Answer 70 Views
Grid
This is a migrated thread and some comments may be shown as answers.
mSchmidt
Top achievements
Rank 1
mSchmidt asked on 21 Oct 2008, 09:40 AM
Hi

I have a grid where i actually have two lines where i show some totals. Currently i have solved it using the code below.
However this simply doesnt give the same look as it would if it was actually two footer lines.

Is it possible to create another footer ?


        gridFooterItem["pr"].Controls.Add(getTable("FirstText","SecondText"));  
 
        private Panel getTable(string s1, string s2)  
        {  
            Panel mTemp = new Panel();  
            mTemp.Controls.Add(new Label() { Text = s1 });  
            mTemp.Controls.Add(new LiteralControl("<br/>"));  
            mTemp.Controls.Add(new Label() { Text = s2 });  
 
            return mTemp;  
        } 

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 22 Oct 2008, 12:33 PM
Hi mSchmidt,

One possible approach in this case would be to employ a template column, and manually craft the footer. This may be something like:

.aspx
  <telerik:GridTemplateColumn> 
                    <FooterTemplate> 
                    <table> 
                    <tr> 
                    line1  
                    </tr> 
                    <tr> 
                    line2  
                    </tr> 
                    </table> 
                    </FooterTemplate> 
                    </telerik:GridTemplateColumn> 

I hope this suggestion helps.

Regards,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
mSchmidt
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or