Home - Forums-.NET - FlyGrid.Net (Windows Forms) - MultySelect

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

MultySelect
Link Posted: 07-Feb-2006 02:29
i have the next problem:
i selecte a node and the i check the selectednodes array and it has 1 item.
than i set the grid options to multyselect because i want to choose another one.
but after i set the options, the array goes back to 0.

please check.

thanks, Guy.
Link Posted: 07-Feb-2006 03:19
use following code to get selection:
[c#]
private Node[] GetSelection(FlyGrid flyGrid)
{
  if ((flyGrid.Options & GridOptions.MultiSelect) != 0)
  {
    NodeBase[] selection = flyGrid.Rows.GetSelection();
    //has multiple selection  
    if (selection != null && selection.Length > 0)
      return selection;
  }
  //has single selection - selected/focused node
  return new NodeBase[]{flyGrid.Selected};
}