Hi Ricardo,
Thanks for using Syncfusion product.
To add the line when insert the record in GridGroupingControl, you could use the SourceListRecordChanged event to get the newly added record and use the QueryCellStyleInfo event to set the border for that record. Please refer the following code example and the sample,
Code example
this.gridGroupingControl1.SourceListRecordChanged += GridGroupingControl1_SourceListRecordChanged;
this.gridGroupingControl1.QueryCellStyleInfo += GridGroupingControl1_QueryCellStyleInfo;
List<Record> newRecords = new List<Record>();
private void GridGroupingControl1_SourceListRecordChanged(object sender, Syncfusion.Grouping.RecordChangedEventArgs e)
{
if(e.Action == Syncfusion.Grouping.RecordChangedType.Added)
{
newRecords.Add(e.Record);
}
}
private void GridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if (e.TableCellIdentity == null || e.TableCellIdentity.Column == null)
return;
if (e.TableCellIdentity.DisplayElement.Kind == DisplayElementKind.Record)
{
var record = e.TableCellIdentity.DisplayElement.GetRecord();
if (record != null && newRecords.Contains(record))
{
e.Style.Borders.Top = new GridBorder(GridBorderStyle.Solid, Color.Blue);
}
}
}
|
Let us know whether this helps also if you need any further assistance on this.
Arulraj A