Hi all,
I have an interesting problem here.
I have created a custom datagrid control which is inherited from the
Standard Winforms Datagrid(System.Windows.Forms.Datagrid). I have included
an additional capability of dragging and dropping the columns(ie. re-order
the columns) on the fly to the existing control. This works fine, but
problem arises when the AllowSorting property is set to true. When I drag
and drop the column with the AllowSorting property(of the grid or the
TableStyle) set to true, it automatically sorts the column which is
drag-n-dropped. I tried to set the AllowSorting property to false while
dragging the column, but it resets the whole stuff, ie. it does not preserve
the existing sort order after drag-and-drop.
Is there any way that can prevent this behaviour?
adr - 30 Dec 2004 14:34 GMT
Look at this article maybe it can help you.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwinforms/html
/dragdrop_datagrid.asp
David
Sarang Bapat - 31 Dec 2004 05:46 GMT
Hi David,
I have used the same code in my app. My problem is after using this code,
the sorting order is not behaving as expected as I have mentioned in the
scenario.
Regards,
Sarang Bapat
> Look at this article maybe it can help you.
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwinforms/html
/dragdrop_datagrid.asp
> David