How to access the value of hidden and visible columns of a record in WinForms GridGroupingControl?
Access value of hidden and visible columns
Column
value of a
particular row can be accessed by using the gridGroupingControl1.Table.CurrentRecord. The DataRowView class
can be used to get the data from the record. Refer to the following code
example.
private void gridGroupingControl1_CurrentRecordContextChange(object sender, Syncfusion.Grouping.CurrentRecordContextChangeEventArgs e)
{
if(e.Action == CurrentRecordAction.EnterRecordComplete)
{
//Accesses Current record.
Record rec = this.gridGroupingControl1.Table.CurrentRecord;
Console.WriteLine(rec);
}
}Private Sub gridGroupingControl1_CurrentRecordContextChange(ByVal sender As Object, ByVal e As Syncfusion.Grouping.CurrentRecordContextChangeEventArgs)
If e.Action = CurrentRecordAction.EnterRecordComplete Then
'Accesses Current record.
Dim rec As Record = Me.gridGroupingControl1.Table.CurrentRecord
Console.WriteLine(rec)
End If
End SubThe following
screenshots display accessing the value of a column.
Samples:
C#: ColumnsValue-C#
VB: ColumnsValue-VB