BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
Record r = groupingGrid.Table.CurrentRecord
the record object provides methods to get values, e.g. r.GetValue("CustomerID").
You can also get the underlying DataRow when you call r.GetData(). That will return the DataRowView element for the record.
You can get at the currentcell using gridGroupingControl1.TableControl.CurrentCell.
Record r = gridGroupingControl1.Table.CurrentRecord;
int col = this.gridGroupingControl1.TableControl.CurrentCell.ColIndex;
int field = this.gridGroupingControl1.TableDescriptor.ColIndexToField(col);
object o = r.GetValue(this.gridGroupingControl1.TableDescriptor.Fields[field]);
Console.WriteLine(o);
private void button1_Click(object sender, System.EventArgs e) { Element el = this.gridGroupingControl1.TableControl.Table.CurrentElement; if(el != null) { if(el is GridRecord) { DataRowView drv = (el as Record).GetData() as DataRowView; Console.WriteLine(drv[1].ToString()); //show column 2 } else if(el is GridNestedTable) { GridNestedTable gnt = el as GridNestedTable; GridNestedTable gnt1 = gnt; while(gnt1 != null && gnt1.ChildTable != null) { gnt = gnt1; gnt1 = gnt.ChildTable.ParentTable.CurrentElement as GridNestedTable; } DataRowView drv = gnt.ChildTable.ParentTable.CurrentElement.GetData() as DataRowView; if(drv != null) Console.WriteLine(drv[1].ToString()); //show column 2 } } }
private void button1_Click(object sender, System.EventArgs e) { Element el = this.gridGroupingControl1.TableControl.Table.CurrentElement; if(el != null) { if(el is GridRecord) { Record r = el as Record; int col = this.gridGroupingControl1.TableControl.CurrentCell.ColIndex; int field = this.gridGroupingControl1.TableDescriptor.ColIndexToField(col); object o = r.GetValue(this.gridGroupingControl1.TableDescriptor.Fields[field]); Console.WriteLine(o); } else if(el is GridNestedTable) { GridNestedTable gnt = el as GridNestedTable; GridNestedTable gnt1 = gnt; while(gnt1 != null && gnt1.ChildTable != null) { gnt = gnt1; gnt1 = gnt.ChildTable.ParentTable.CurrentElement as GridNestedTable; } Record r = gnt.ChildTable.ParentTable.CurrentRecord; string name = gnt.ChildTable.ParentTable.TableDescriptor.Name; GridTableControl tableControl = this.gridGroupingControl1.GetTableControl(name); int col = tableControl.CurrentCell.ColIndex; int field = gnt.ChildTable.ParentTable.TableDescriptor.ColIndexToField(col); object o = r.GetValue(gnt.ChildTable.ParentTable.TableDescriptor.Fields[field]); Console.WriteLine(o); } } }