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 : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Column Freezing

Thread ID:

Created:

Updated:

Platform:

Replies:

52637 Dec 1,2006 09:01 AM UTC Dec 1,2006 12:28 PM UTC WinForms 2
loading
Tags: GridControl
Tannearu Hazarathaiah Gupta
Asked On December 1, 2006 09:01 AM UTC

Hi,

We are using gridgroupping control. i want achive column freezing following condition.


If a column that is currently ‘frozen’ is dragged to the right of a columns is not frozen, then the column that is being dragged will no longer be frozen. If a column that is currently not frozen is dragged to the left of a column that is frozen, then that column should become frozen.


Please resolve the problem asap.


Regards
Tannearu Hazarathaiah

Administrator [Syncfusion]
Replied On December 1, 2006 09:39 AM UTC

Hi Tannearu,

You can handle the TableControl.QueryAllowDragColumnHeader event and change the frozen column count. Here is a code snippet to show this.

private void TableControl_QueryAllowDragColumn(object sender, GridQueryAllowDragColumnEventArgs e)
{
if( e.Reason.ToString() == "MouseUp")
{
int fColCount = e.TableControl.Model.Cols.FrozenCount;
int row,col;
e.TableControl.TableDescriptor.ColumnToRowColIndex(e.Column,out row,out col);
int irow,icol;
e.TableControl.TableDescriptor.ColumnToRowColIndex(e.InsertBeforeColumn,out irow,out icol);
if( !(col <= fColCount && icol <= fColCount ) )
{
e.TableControl.Model.Cols.FrozenCount = icol;
}
}
}

Here is a sample.
GGCDragFrozenColumnHeader.zip

Best Regards,
Haneef

Tannearu Hazarathaiah Gupta
Replied On December 1, 2006 12:28 PM UTC

Hi haneef,
Its working.

Regards
Tannearu

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

;