Home - Forums-.NET - FlyGrid.Net (Windows Forms) - problem with NodeFocusChanging

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

problem with NodeFocusChanging
Link Posted: 04-Apr-2006 21:06
hi all.
when the FocusNodeChanging event is fired, the \"node\" object is set to the node where we came from, and then the event is fired again and the \"node\" object is set to the node the user clicked on.
what event should we use to get only the first node described?
**we want the event to be fired only once (for the described node).

thanks.
Link Posted: 05-Apr-2006 03:03
NodeFocusChanging fires when Focused property of some node becomes  changed (to true or to false).
If you want to handle new node focusing use following code:
[c#]
private void InitGrid()
{
  //code in flygrid initialization
  this.dataGrid.NodeFocusChanging += new    NodeBoolHandler(dataGrid_NodeFocusChanging);
}
private bool dataGrid_NodeFocusChanging(object sender, NodeBase node)
{
  if (node.Focused == false)//node becomes to be focused
  {
     //here your code///
  }
  return true;
}
Link Posted: 19-Apr-2006 18:15
the NodeFocusChanging Event is fired 3 times!!!
1 for the previous node, 1 for the \"new\" node (the one we clicked on), and another time for the previous node.
you cannot you this method you offered, because of this 3 time problem.
so - how can i get only the previous node and stay inside it if nesassary.