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
close icon

Extra Section Customization

Hi,

Is it possible to customize the extra section area below the column headers to have combobox's and buttons in certain columns that modify the values in the whole column in one click/selection?

If possible, can you point me towards a demo or provide a simple example?

Very much appricated, thanks.

Mitul

9 Replies

HA haneefm Syncfusion Team March 28, 2007 09:07 PM UTC

Hi Mitul,

To customize the extra section appearance in a grid, you need to handle the QueryCellStyleInfo event of the grid and set the e.Style.CellType to new display type. Please try this and let me know if this.

Best regards,
Haneef

[c#]
private void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if ( e.TableCellIdentity.DisplayElement is BelowColumnExtraSection)
{
switch(e.TableCellIdentity.ColIndex )
{
case 0:
e.Style.CellType = "Header";
break;
case 1:
e.Style.CellType = "PushButton";
e.Style.Description = "ExtraButton";
break;
case 2:
e.Style.CellType = "ComboBox";
e.Style.DataSource = GetParentTable();
e.Style.ValueMember = "PhaseNumber";
e.Style.DisplayMember = e.Style.ValueMember;
break;
default:
e.Style.CellType = "TextBox";
break;
}
e.Style.BackColor = Color.Red;
}
}


MI Mitul March 31, 2007 01:22 AM UTC

Superb, thanks!


SK Sameer Khan December 30, 2008 09:02 PM UTC

The code works; except for 2 issues:

1. Adding a group, messes up the extra row.

2. Even when I have the Allow New flag set to false; I see a blank row. I can think of some work arounds for issue 1, but issue 2 is very important to me; I don;t want to see the blank row in my grid. what do I need to do?



SK Sameer Khan December 30, 2008 09:05 PM UTC


I fixed issue 2; I really was not looking carefully, but you were adding the row in the OnInitializeSections of GroupingChildTable.

So I got rid of that, I would appreciate it, if i had some help on 1



SK Sameer Khan December 30, 2008 09:38 PM UTC

is there a way to add an extra section w/o having to extend GridEngineFactoryBase.





RC Rajadurai C Syncfusion Team December 31, 2008 02:51 PM UTC

Hi Sameer,

Thanks for your interest in Syncfusion products.

Subclassing the GridEngineFactoryBase is the best and simplest way to achieve adding, reordering of different sections.

You can try this in other way. But it is just that whenever you change the GroupedColumns collection or when the table is set "Dirty", all existing groups will be discared and reinitialized. Also, the TopLevelGroup will be reinitialized. You could listen to the CategorizedRecords event to be notified when that happened and then reinsert the section again.

Regards,
Rajadurai



SK Sameer Khan December 31, 2008 05:38 PM UTC

I want to be able to add a check box and a combo box [ different columns].

The combobox example given does not do anything useful with the Change event. How do I determine what the user selected in the combo box. I tried TableControlCurrentCellCloseDropDown event, the event args didn't give me anything useful wrt the state of the selected item.

I want to be able to get the value of the selected item, and show it in the extra section, the implementation shown simply blanks out.

In addition I tried adding a check box, but that didnt work either. I want to capture the state of the check box and make all the values of the column the same.

Is there some write up on all this, the help files and the samples provided don't completely explain the potential of the grid.

I would appreciate any help on this.




SK Sameer Khan January 2, 2009 02:12 PM UTC

Any updates on this?



RC Rajadurai C Syncfusion Team January 3, 2009 10:39 AM UTC

Hi Sameer,

Please refer to the following sample that solves the issue of combobox and checkbox in extra section.
http://www.syncfusion.com/support/user/uploads/I52421_1ad95d13.zip

Regards,
Rajadurai


Loader.
Live Chat Icon For mobile
Up arrow icon