Home - Forums-.NET - FlyGrid.Net (Windows Forms) - Drag&Drop

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

Drag&Drop
Link Posted: 31-Jan-2006 05:20
Hello,
when i use the drag drop events, i do my logic on the dataview that i have as a datasource (i'm using virtual mode).

my problem is that if i do so, the order of the nodes, in the collection does not refresh, and i get the wrong node.
i can solve this problem by using "flygrid.rows.rootnode=null"

the problem with this is that it collepses all the expanded nodes.
how can i get them back to the way they were before...?

or, how the refresh the nodes without this line.

thanks, Guy.
Link Posted: 31-Jan-2006 15:29
There are some solutions of this problem:
[list]
  • You can try to sort nodes by FlyGrid.Rows.Items.Sort(IComparer comparer) to avoid refreshing of nodes in the FlyGrid.
  • [/*:m]
  • You can store Expanded state in the datasource and init expanded state in the InitNewNode procedure to hold current view of nodes.
  • [/*:m][/list:u]
    Also: With Drag'Drop operation you can use some unique identifier of node (key field value for example) to find source or target node.