Home - Forums-.NET - FlyGrid.Net (Windows Forms) - SelectionChanged/ing events don't work in virtual mode?

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

SelectionChanged/ing events don't work in virtual mode?
Link Posted: 07-Aug-2006 15:40
first why don't these events work in virtual mode?

the reason why i want this is because i'm tring to make the grid keep old nodes selected when you edit the virtual list. how can i do this?

if i do:

// this code is in a timer refreshing the grid every 200ms

      selectedNodes = grid.Rows.GetSelection();
      
  
      grid.Rows.Reset();
      grid.Invalidate();

      if (selectedNodes != null)
        foreach (NodeBase n in selectedNodes)
          n.Selected = true;

it does not unselect the old selected node. multi select is not enabled.




Thanks, Joe
Link Posted: 07-Aug-2006 23:02
FlyGrid.SelectionChanged/SelectionChanging events fired when MultiSelect is enabled, when FlyGrid.Options.MultiSelect disabled use FlyGrid.NodeSelectedChange/NodeSelectedChanging events.
And do not forget that NodeSelectedChanging event fires when node is becoming/ to selected and becoming to unselected, and NodeSelectedChanged fires when node is selected and unselected.
In this case you should analyze state of the node:
node.Selected == false in NodeSelectedChanging means that node is becoming to be selected, otherwise - unselected.