Home - Forums-.NET - FlyGrid.Net (Windows Forms) - Locking binded row from editing

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

Locking binded row from editing
Link Posted: 10-Oct-2005 00:58
Hello
i have a flygrid that is binded to a dataset, and a form which is binded to a specific datarow that is in the flygrid.
i would like to give a message to the user when he tries to edit the row in the grid, which is currently being edited in the form that this row cannot be edited right now and is being edited in other place.
i do it by checking if the datarow has a proposed version (which datarow has between BeginEdit and EndEdit).
The problem is that i couldnt find a needed event in the flygrid, that called when i enter the cell to edit it, and eventually i used the NodeClick event.
The NodeClick event causes sometimes to a problem in which when i edit a number of cells in the same row in flygrid, in switching from cell to cell, the NodeClick is called before EndEdit of the datarow is called, and i get the message that the row is edited in other place although it is edited only in the grid.
is there any solution for this problem?
thanks in advance.
Link Posted: 10-Oct-2005 18:51
More better way is using FlyGrid.NodeFocusChanging/NodeFocusChange events.
Check the node.Focused == false in the NodeFocusChanging handler to be sure that the nodes becomes to be focused and lock or unlock flyGrid from editing.
In the NodeFocusChange handler check node.Focused == true to be sure that the node is focused to lock/unlock FlyGrid from editing.