Hi Bernhard,
Thank you for your interest in Syncfusion products.
The GridGroupingControl does not have any built-in support to set default value for column however, this can be achieved by customizing the QueryCellStyleInfo event. In that event, the Text property can be updated with default value based on conditions. We have created a simple sample as per your requirement. Please make use of below code and sample.
Example code
|
this.gridGroupingControl1.TableDescriptor.Fields["PF"].DefaultValue = "0";
//Event subscription
this.gridGroupingControl1.QueryCellStyleInfo += GridGroupingControl1_QueryCellStyleInfo;
//Event customization
private void GridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if(e.TableCellIdentity != null && e.TableCellIdentity.Column != null && e.TableCellIdentity.Column.Name == "PF"
&& e.Style.CellValue != null && string.IsNullOrEmpty(e.Style.CellValue.ToString()))
{
e.Style.Text = "0";
e.Handled = true;
}
} |
Please let us know, if you need any further assistance.
Regards,
Arulpriya