Drag and Drop Columns

Hi,

I don't want user to be able to drag and drop the frozen columns. Also I don't want to allow them to drag and drop any columns over frozen columns.

How can I achieve the above functionality?

Thanks,
Amiya

1 Reply

AD Administrator Syncfusion Team March 23, 2007 05:38 PM UTC

Hi Amiya,

One way you can do this by handling the QueryAllowDragColumnHeader event and setting the e.AllowDrag property to False to prevent from moving the column header in a grid. Here is a code snippet

private void gridQueryAllowDragColumnHeader(object sender, GridQueryDragColumnHeaderEventArgs e)
{
if( e.Column > this.grid.Model.Cols.FrozenCount )
e.AllowDrag = false;
}

Best regards,
Haneef

Loader.
Up arrow icon