Hi
While Grouping in XamGrid I need to change the Header format displayed in the Group Header.I tried the fowllowing code to do that private void XamDataGridDetails_InitializeRecord(object sender, InitializeRecordEventArgs e){ if (e.Record != null)
{
GroupByRecord gbr = e.Record as GroupByRecord;
if (gbr != null)
gbr.Description = string.Format(" {0}", gbr.Value.ToString());
else gbr.Description = "NULL"; }It works fine if you only need to change the description of the Header but how to include lets say a button in the Group Header?Is there a way to define a GroupRecrod Template? or something GroupRecordStyle?Any ideas?
Thanks
Hello rehmanmansoor,
It has been a while since you have made your post, in case you still need of support I will be glad to assist you on the matter. I suppose the other community members can benefit from this answer as well. So regarding your issue I can suggest you retemplate the default style for the GroupByRecordPresenter. This will allow you place any UIElement you want in the headers of the grouped fields and you can control the whole design of the XamDataGrid in group by mode. You can find the default templates of the XamDataGrid on your computer in the file
C:\Program Files (x86)\Infragistics\NetAdvantage 2011.1\WPF\DefaultStyles\DataPresenter\DataPresenterGeneric_Express.xaml .
Please find the attached sample where I show this possible approach by placing a button along with the standard text in the headers on group by mode .
If you still have any questions with this, please do not hesitate to ask.