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

Grid GroupFooter in Bold

3 Answers 143 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sambhav Jain
Top achievements
Rank 1
Sambhav Jain asked on 20 Apr 2010, 07:49 AM
Hi All,
          I have a issue with Telerik grid grouping footer.

My Req: I want the Grid group by footer to appear as bold in Font.I had tried to use for Footer style.but it seems like it will make font bold for grid footer,not the group by footer.I am not able to find any work around for this.

Scenario: I am using a grid with skin file "Office 2007".Grid has sorting and paging enabled.
Please help me.

Thanks,
Sambhav

3 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 20 Apr 2010, 08:54 AM
Hi Sambhav,

I tried following code in order to set GroupFooter font to Bold.

CS:
 
    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridGroupFooterItem) 
        { 
            GridGroupFooterItem groupFooter = (GridGroupFooterItem)e.Item; 
            groupFooter.CssClass = "MyClass"
        } 
    } 

CSS:
 
    <style type="text/css"
        .MyClass 
        { 
            font-weightbold !important; 
        } 
    </style> 

Regards,
Princy.
0
Sambhav Jain
Top achievements
Rank 1
answered on 20 Apr 2010, 09:06 AM
Hi Princy,
      I used the same code which u have given.But unfortunately its not working.I am using a telerik grid.which is inside a master page.Does master page will have any dependency int his page.And also I am using a Skin file.

Can u please help me on this
0
Sambhav Jain
Top achievements
Rank 1
answered on 20 Apr 2010, 09:23 AM
HI Princy,
               After I made a small change in ur code its works superbly.................... :)
Change I made is instead of style sheet.I directly give the font to bold in Item databound event.

if (e.Item is GridGroupFooterItem)
        {
            GridGroupFooterItem groupFooter = (GridGroupFooterItem)e.Item;
            groupFooter.Font.Bold = true;
        }
now its working fine..........

Thanks a Ton Princy............. Since I am unable to find any property in aspx page its become really difficult for me to acheive the functionality.
With ur code I am able to acheive it Once again thanks.................

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