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

[Solved] How to freeze a column in the grid while horizontal scroling.

5 Answers 336 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Karthick Purushothaman
Top achievements
Rank 1
Karthick Purushothaman asked on 11 Nov 2009, 09:55 AM
Hi,

Can anyone tell me how can i freeze a column in the grid while horizontal Scrollng. 

In my application i have 4 columns and i need my first column should me always visible (freeze) while am doing horizontal scrolling.

Thanks & Regards,
Sushanth Mathew.



5 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 11 Nov 2009, 10:11 AM
Hi Sushanth Mathew,

Set the ClientSettings -> Scrolling -> FrozenColumnsCount property of the control to 1 which determines the count of columns (starting from the leftmost column) which will be statically positioned when you drag the horizontal scroll in the grid.
Frozen Columns

Regards,
Shinu.
0
Karthick Purushothaman
Top achievements
Rank 1
answered on 11 Nov 2009, 10:23 AM
Hi,

I done the client settings as mentioned below:

<

 

ClientSettings>

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True" FrozenColumnsCount="2">

 

 

</Scrolling>

 

 

</ClientSettings>

 


But am not getting the horizontal scrol bar.  How can i able to achieve the horizontal scroll bar.

Thanks & Regards,
Sushanth Mathew.
0
Pavlina
Telerik team
answered on 11 Nov 2009, 01:15 PM
Hi Karthick,

In order to display horizontal scroll for navigation, you need to make sure that the total width of the columns (either auto-generated or declaratively set) exceeds the width of the grid (as demonstrated in this online demo).

All the best,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Karthick Purushothaman
Top achievements
Rank 1
answered on 11 Nov 2009, 01:36 PM

Hello Team,


I can be able to freeze the first column and also getting horizontal as well as vertical scroll bar.

But now my issue is, i cant be able to give seperate width for each columns. If i gave the seperate width for the columns, column Freezing is not working. Column freezing is working only when i gave equal width for all the columns in the grid.
 

How can i able to gave different width for each colums without affecting the column freezing. Can any one help me to solve this issue?

I am using the following code for the column freezing:

 

 

 

 

 


    

 

Thanks & Regards,
Sushanth Mathew

0
Pavlina
Telerik team
answered on 12 Nov 2009, 03:35 PM
Hi Karthick,

You can control the individual column widths through the HeaderStyle -> Width property of each column. How to set this property for declarative/auto-generated columns from the code-behind you can see from the last paragraph of this documentation topic.

Regards,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Karthick Purushothaman
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Karthick Purushothaman
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or