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

Freezing the RAD Grid Data Rows

3 Answers 262 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alexis
Top achievements
Rank 1
Alexis asked on 17 Sep 2010, 11:21 AM
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.

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 17 Sep 2010, 01:00 PM
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.
0
Gordon
Top achievements
Rank 1
answered on 25 Oct 2012, 07:45 PM
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
0
Kostadin
Telerik team
answered on 30 Oct 2012, 02:22 PM
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.
Tags
Grid
Asked by
Alexis
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Gordon
Top achievements
Rank 1
Kostadin
Telerik team
Share this question
or