Find last row of rad grid

3 posts, 0 answers
  1. Sushanth
    Sushanth avatar
    3 posts
    Member since:
    Oct 2016

    Posted 09 Nov Link to this post

    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. Marin
    Admin
    Marin avatar
    1043 posts

    Posted 09 Nov Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Sushanth
    Sushanth avatar
    3 posts
    Member since:
    Oct 2016

    Posted 09 Nov in reply to Marin Link to this post

    Dear Marin,

    Thanks a lot it works..

Back to Top