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

Find last row of rad grid

2 Answers 553 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sushanth
Top achievements
Rank 1
Sushanth asked on 09 Nov 2016, 01:17 PM

Hi,

How can i find the last row of a rad grid and make the last row bold.

I Have a rad grid in which iam fetching the total from the database itself as in attached file. I do not want to add the footer and use aggregate function

Thanks in advance

Sushanth.B

2 Answers, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 09 Nov 2016, 02:53 PM
Hello,

If that last row is part of the data items of the grid you can use the following code to make it bold:
protected void Page_PreRender(object sender, EventArgs e)
{
    RadGrid1.Items[RadGrid1.Items.Count - 1].Font.Bold = true;
}

You can also access any other type of item (footer, pager, etc.) by using the GetItems(itemType) method of the MasterTableView.

Regards,
Marin
Telerik by Progress
Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
0
Sushanth
Top achievements
Rank 1
answered on 10 Nov 2016, 04:59 AM

Dear Marin,

Thanks a lot it works..

Tags
Grid
Asked by
Sushanth
Top achievements
Rank 1
Answers by
Marin
Telerik team
Sushanth
Top achievements
Rank 1
Share this question
or