Freezing the RAD Grid Data Rows

4 posts, 0 answers
  1. Alexis
    Alexis avatar
    23 posts
    Member since:
    Aug 2010

    Posted 17 Sep 2010 Link to this post

    Hi ,
                 
    I'm using Rad Grid and i assigned data table as data source for RadGrid on my project. i need to freeze the Rad Grid first 2 rows excluding Headers. I need solution for this urgent.... help me out on this...

        DataTable dT = HtmlTableParser.ParseTable(pvt);
        MainGrid2.DataSource = dT;
                MainGrid2.DataBind();

    Column 0

    Column 1

    Column 2

    Column 3

    Column 4

     

    2007

    2008

    2009

    2010

    Header Value

    Capital Exp

    Capital Exp

    Capital Exp

    Capital Exp

    Akron

    16205.00

    2661.00

    2215.00

    0.00

    Allen

    0

    0

    1342.00

    1672.00

    Alpharetta I

    0.00

    0.00

    0.00

    0.00



    i need to freeze these Red colored data in this RadGrid.

    Column 0

    Column 1

    Column 2

    Column 3

    Column 4

    this is Header for this Grid. others are data which i get from Data Table. i need to Freeze only the first two rows of the above data table.

    I need the solution as soon as possible.

    thanks in advance,
    Alexis.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 17 Sep 2010 Link to this post

    Hello Alexis,

    As far as I know, we cannot make the RadGrid rows as static. The only content, which may be kept frozen (static) is the header, command item, pager and footer, if you enable scrolling with static headers as described in the forum.

    One workaround is using HeaderTemplate for the columns and use row like structure. Add labels inside HeaderTemplate and set the Text property of Label accordingly (as the cell value of first two rows). Set UserStaticHeader property to True. And then hide the first two rows in RadGrid.

    Hope this suggestion helps.


    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Gordon
    Gordon avatar
    1 posts
    Member since:
    Jul 2012

    Posted 25 Oct 2012 Link to this post

    I am bringing back an old thread to get an update on the latest version (2012 Q2).

    Does the current version of RadGrid support freezing data rows for an auto generated grid?  The proposed option by Princy requires a customized HeaderTemplate which is not used in my auto generated solution.

    Thanks
  5. Kostadin
    Admin
    Kostadin avatar
    1713 posts

    Posted 30 Oct 2012 Link to this post

    Hello Gordon,

    If you have some information which is related to all the data in the grid, it is better to be in the header. The proposed suggestion by Princy could be implemented in your scenario as well. Another possible solution is to use Multi-Column Headers.

    Kind regards,
    Kostadin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top