We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Freeze columns / Rows in GridGroupingControl

Thread ID:

Created:

Updated:

Platform:

Replies:

19528 Sep 28,2004 03:06 PM UTC Sep 29,2004 04:23 PM UTC WinForms 10
loading
Tags: GridControl
Albert Gao
Asked On September 28, 2004 03:06 PM UTC

In GridControl, I can use Cols.FreezeRange to freeze some columns. I didn''t find correspondent Cols property in GridGroupingControl. Is there way to freeze columns? thanks, Albert

Albert Gao
Replied On September 28, 2004 03:14 PM UTC

I am able to freeze the column by this: gridGroupingControl.TableModel.Cols.FreezeRange(col1, col1); But it looks like first column is frozen, no matter what col1 is. And it didn''t move columns. >In GridControl, I can use Cols.FreezeRange to freeze some columns. I didn''t find correspondent Cols property in GridGroupingControl. Is there way to freeze columns? > >thanks, >Albert

Administrator [Syncfusion]
Replied On September 28, 2004 04:38 PM UTC

Hi Albert. you need to manually move columns by rearringing the Columns or VisibleColums collection. If you set TableModel.FrozenCount = 0 I think also the row header will scroll. Be aware also that when you have GroupedColumns you need to increase the FrozenCount. Stefan

Albert Gao
Replied On September 28, 2004 05:21 PM UTC

Thank you, Stefan. I found that MoveRange of Table.Model.Cols is not working. I am going to use VisibleColumns according to your suggestion. Albert >Hi Albert. > >you need to manually move columns by rearringing the Columns or VisibleColums collection. > >If you set TableModel.FrozenCount = 0 I think also the row header will scroll. > >Be aware also that when you have GroupedColumns you need to increase the FrozenCount. > >Stefan >

Albert Gao
Replied On September 28, 2004 05:28 PM UTC

I want to disable column moving for the columns which are frozen. The handler of ColsMoving from TableModel is only invoked from MoveRange function call. How can I disable moving forzen columns by mouse? Thanks, Albert >Thank you, Stefan. I found that MoveRange of Table.Model.Cols is not working. I am going to use VisibleColumns according to your suggestion. > >Albert > >>Hi Albert. >> >>you need to manually move columns by rearringing the Columns or VisibleColums collection. >> >>If you set TableModel.FrozenCount = 0 I think also the row header will scroll. >> >>Be aware also that when you have GroupedColumns you need to increase the FrozenCount. >> >>Stefan >>

Albert Gao
Replied On September 28, 2004 05:50 PM UTC

After the following code, I found that even valid moving operation is not working: GridVisibleColumnDescriptor col = ctrl.TableDescriptor.VisibleColumns[colname]; ctrl.TableDescriptor.VisibleColumns.Remove(colname); ctrl.TableDescriptor.VisibleColumns.Insert( ctrl.TableModel.Cols.FrozenCount-1, col); Please help. thanks, Albert >I want to disable column moving for the columns which are frozen. The handler of ColsMoving from TableModel is only invoked from MoveRange function call. How can I disable moving forzen columns by mouse? > >Thanks, >Albert > >>Thank you, Stefan. I found that MoveRange of Table.Model.Cols is not working. I am going to use VisibleColumns according to your suggestion. >> >>Albert >> >>>Hi Albert. >>> >>>you need to manually move columns by rearringing the Columns or VisibleColums collection. >>> >>>If you set TableModel.FrozenCount = 0 I think also the row header will scroll. >>> >>>Be aware also that when you have GroupedColumns you need to increase the FrozenCount. >>> >>>Stefan >>>

Administrator [Syncfusion]
Replied On September 28, 2004 06:43 PM UTC

Hi Albert, the problem that dragging does not work when you modify VisibleColumns has been addressed in more recent private builds. But you can work-around it for now by rearranging the columns within the Columns collection. Stefan

Albert Gao
Replied On September 29, 2004 10:38 AM UTC

Thank you very much Stefan. The workaround works. Another goal I want to achieve is that disabling draging on frozen column. I added Cols_Moving handler. It didn''t help. >Hi Albert, > >the problem that dragging does not work when you modify VisibleColumns has been addressed in more recent private builds. > >But you can work-around it for now by rearranging the columns within the Columns collection. > >Stefan >

Administrator [Syncfusion]
Replied On September 29, 2004 11:30 AM UTC

We added a QueryAllowDragColumn event for that - I think that was after 2.1.0.9. You can submit a dtrac incident. Then we can give you access to later version that has that event. Stefan

Administrator [Syncfusion]
Replied On September 29, 2004 02:02 PM UTC

I have the lastest version 2.1.0.50. I added the following handler: int col=-1, row = -1; Debug.WriteLine(e.Column, "QueryAllowDragColumn - "); if (this.TableDescriptor.ColumnToRowColIndex(e.Column.Name, out row, out col)) { Debug.WriteLine("out row - " + row + ", out col " + col); if (col +1 <= this.TableModel.Cols.FrozenCount) { Debug.WriteLine("FrozenCount is " + this.TableModel.Cols.FrozenCount + " Disabling column dragging "); e.AllowDrag = false; } } I can see in the debug window, it was saying the dragging is disabled. But I am still able to drag the frozen column. I don''t know if .50 is the build you mentioned earlier. When I switched back to VisibleColumns, I still saw the same problem. I have problem with the workaround with Columns. When I am dragging the frozen column, the dragging image shows initial column, not the one frozen. Thanks, albert >We added a QueryAllowDragColumn event for that - I think that was after 2.1.0.9. > >You can submit a dtrac incident. Then we can give you access to later version that has that event. > >Stefan

Albert Gao
Replied On September 29, 2004 04:23 PM UTC

Sorry - I found the project still associated with 2.1.0.9. It works. Should I blame the installer? :-)

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;