BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Query |
Solution |
Can you tell me how to convert GridGroupingControl,table.currentrecord into datarow, So I can update the value in the select row of GCC |
Suggestion - 1
Using GetData() method:
The data row can be retrieved and it can be updated for the current record value by using GetData() method. Please make use of below code.
Code snippet
private void button1_Click(object sender, EventArgs e)
{
//Using GetData() method
if (this.gridGroupingControl1.Table.CurrentRecord != null)
{
DataRowView dataRowView = this.gridGroupingControl1.Table.CurrentRecord.GetData() as DataRowView;
dataRowView.Row["Col1"] = "NewValue";
}
}
|
Suggestion - 2
Using SetValue() method:
The current record value can be updated by using SetValue() method. Please make use of below code.
Code snippet
private void button1_Click(object sender, EventArgs e)
{
//Using SetValue() method.
if (this.gridGroupingControl1.Table.CurrentRecord != null)
{
this.gridGroupingControl1.Table.CurrentRecord.SetValue("Col1", "NewValue");
}
} |