We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

GGC: Auto-populating values when adding new record inside a group

Hi! Is it possible to automatically fill columns in a new record based on the group you are inside? I show an AddNewRecordAfterDetails on my lowest group level, and would like the grouping columns automatically filled. Regards, Sigurd Ringbakken

5 Replies

Administrator March 8, 2005 02:13 PM UTC

In 3.0.1.0, when I start typing in the new row within a group, the grouped values automatically appear. Here is a sample. If I type into Col2 or Col3 on any of the new rows within a group, Col0 and Col1 auto-populate for me. http://www.syncfusion.com/Support/user/uploads/GGC_AUtoPopNewRow_14976c62.zip

SR Sigurd Ringbakken March 8, 2005 02:47 PM UTC

>In 3.0.1.0, when I start typing in the new row within a group, the grouped values automatically appear. > I group by columns added as a ForeignKeyReference relation. The grouped values does not appear automatically in the new record. Regards, Sigurd Ringbakken

Administrator March 8, 2005 05:04 PM UTC

This is currently not supported. I added this to our defect database. http://www.syncfusion.com/support/issues/grouping/Default.aspx? As a work around you can try catching the CurrentRecordContextChanged event and set teh initial values there.
private void gridGroupingControl1_CurrentRecordContextChange(object sender, CurrentRecordContextChangeEventArgs e)
{
	if(e.Record is GridAddNewRecord && e.Action == CurrentRecordAction.BeginEditCalled )
	    Console.WriteLine(e.Record.ToString());
}

SR Sigurd Ringbakken March 9, 2005 02:46 PM UTC

>As a work around you can try catching the CurrentRecordContextChanged event and set teh initial values there. One of my problems is that I use a ForeignKeyReference relation that uses 2 relation keys. This means that one key must be set in my parent record previous to selecting a record from the child table. But the CurrentRecordContextChanged event is not fired when clicking on a dropdown...

Administrator March 9, 2005 03:55 PM UTC

You can use this.gridGroupingControl1.TableControlCurrentCellShowingDropDown to catch the dropdown being clicked.
Loader.
Live Chat Icon For mobile
Up arrow icon