I have a ComponentOne FlexGrid that is filled with a DataTable. Every DataTable column has its own column assigned in this grid, but there is an additional column (declared in the Designer) configured like cells with checkboxes (type boolean) and the user will select values after.
I fill the grid with a for loop:
With My_StoreProcedure()
For I As Integer = 1 To .Rows.Count()
gridDates.Item(I, cPatron)= .Rows(I - 1).Item("patron")
gridDates.Item(I, cColumn2)= .Rows(I - 1).Item("anothercolum2")
gridDates.Item(I, cColumn3)= .Rows(I - 1).Item("anothercolum3")
[..other 3 columns more...]
Next I
Then user select checkboxes from the grid result obtained hit a 'Get' button which calls a method that contains another loop, I have this inside loop to get the value:
With gridDates
For I As Integer = 1 To .Rows.Count() - 1
'Dim celda As Object = gridDates.Item(I, 8)
'Here it is where it doesn't work:
Dim value As C1.Win.C1FlexGrid.CheckEnum = .GetCellCheck(I, columnwithCheck)
If value = C1.Win.C1FlexGrid.CheckEnum.TSChecked Then
Dim patron As String = gridDates.Item(I, 1).ToString
Dim value2 As String = gridDates.Item(I, 2).ToString
Dim value3 As Char = CChar(gridDates.Item(I, 3))
[some other values...]
StoreSave(patron, value2, value3, ...)
End If
Next I
End With
I set a breakpoint and found that I get an empty object, it doesn't get the current value of any checkbox.
How can I retrieve that value in a proper way?
Edit: I just added code generated related to the grid in Designer:
'
'gridDates
'
Me.gridDates.AllowDragging = C1.Win.C1FlexGrid.AllowDraggingEnum.None
Me.gridDates.AllowFreezing = C1.Win.C1FlexGrid.AllowFreezingEnum.Both
Me.gridDates.AllowResizing = C1.Win.C1FlexGrid.AllowResizingEnum.None
Me.gridDates.AllowSorting = C1.Win.C1FlexGrid.AllowSortingEnum.None
Me.gridDates.ColumnInfo = resources.GetString("gridDates.ColumnInfo")
Me.gridDates.ExtendLastCol = True
Me.gridDates.KeyActionEnter = C1.Win.C1FlexGrid.KeyActionEnum.MoveAcross
Me.gridDates.Location = New System.Drawing.Point(12, 104)
Me.gridDates.Name = "gridDates"
Me.gridDates.Rows.Count = 500
Me.gridDates.Rows.DefaultSize = 19
Me.gridDates.SelectionMode = C1.Win.C1FlexGrid.SelectionModeEnum.Row
Me.gridDates.Size = New System.Drawing.Size(742, 261)
Me.gridDates.StyleInfo = resources.GetString("gridDates.StyleInfo")
Me.gridDates.TabIndex = 1