Home - Forums-.NET - FlyGrid.Net (Windows Forms) - Changed Rows...

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

Changed Rows...
Link Posted: 12-Dec-2005 02:36
If I have a grid with 10 columns and 50 rows for example, and I modify 5 rows (not bound data to flygrid) is there a way that I could find those 5 rows that have been modified and then loop through them getting all the data in each column on those rows???

Would it be possible for an example code, in VB if possible???

Thank you

Simon
Link Posted: 12-Dec-2005 16:42
You can mark modified nodes in the FlyGrid.NodeCellChange event handler:

Private Sub flyGrid_NodeCellChange(ByVal sender As Object, ByVal node As NineRays.Windows.Forms.Data.NodeBase, ByVal index As Integer, ByVal value As Object) Handles flyGrid.NodeCellChange
    node.Modified = True
End Sub
Link Posted: 13-Dec-2005 01:05
OK, that seems easy. However how would I collect all the rows that node.modified = true and loop through them add get all the data from each column in the respective row???

Thanks for your help

Simon
Link Posted: 13-Dec-2005 02:12
You can collect modified rows in the special collector:
[VB]
'modified nodes collector
private modifiedNodes as ArrayList = new ArrayList()

Private Sub flyGrid_NodeCellChange(ByVal sender As Object, ByVal node As NineRays.Windows.Forms.Data.NodeBase, ByVal index As Integer, ByVal value As Object) Handles flyGrid.NodeCellChange
    If (Not modifiedNodes.Contains(node)) Then
       modifiedNodes.Add(node)
    End If
End Sub
Link Posted: 28-Dec-2005 05:35
How would I get a value out of a specific column out of the modified node arraylist???

Example code but is not working:


dim i as interger
for i = 0 to modifiedNodes.count - 1
MsgBox(modifiedNodes.Item(i).GetType.GetField("colLineSize"))
Next i


Thanks for the help

Simon
Link Posted: 17-Jan-2006 07:18
???
Link Posted: 18-Jan-2006 07:30
[Vb.Net]
Dim i as Integer
For i = 0 To modifiedNodes.Count - 1
  Dim node as NodeBase = modifiedNodes(i)
  MsgBox(node("colLineSize"))
Next i