Hi ,
I have 30 columns in grid.
When i right click on the particular column header , pops up menu with freeze and unfreeze menu items.
If i click on the freeze menu item , it should freeze till that column .
If i right clcik on the 10 th column and click on freeze , it should freeze 1- 10 column s
If i right click and click on unfreeze gris should be normal .
Any help.
Thanks.
Hi,
What part of this are you having trouble with? There is no built-in functionality in the grid to do this with a context menu or to freeze multiple columns at once with the grid's UI.
But you could easily create your own context menu for this.
You will need to set UseFixedHeaders on the grid's DisplayLayout to true to enable fixed header. You have to be using RowLayoutStyle = None, fixed headers are not supported in RowLayout mode.
Here's an article that will help you detect which column was right-clicked.
HOWTO:UltraWinGrid Mouse Position and Column Identification
To fix a column, you simply set column.Header.Fixed to true.
I right clciked on 5 th column and I got the right clicked column index =5
Where should I use the line of code to freeze the columns from (1 to 5 columns).
Should I use below line of code only for 5 th column or to the all 5 columns(that upto right clicked column from 1 to 5)
headers.fixed =true
Where should I place this code exactly ,
Is their a property (frozen property ) in which i can set the no columns i need to freeze for a frid.
like grid.columns frozen=6, so that it can freeze firat 6 column of the grid.
Thanks