Grid Repeating Column Groups

I have to create windows forms Grid with Repeating Columns in it. Here is the example

I have a table it has columns
ProductID ProductName WeekNumber Sales Inentory

I have to show Grid Columns as

ProductID ProuductName Week1
Sales Inventory

Week will be repeated for a quarter or month or based on the selection filters. I could not find any sample discuss about repeating Column Groups . Current Examples make the row grouping than a column grouping. I think GridStackedHeaderSection used for this purpose.I can dynamically create so many columns in a dataset and bind to the grid. Is there a better solution to it. Even if it uses 2 tables using Master and Child if it can show repeating groups that will be great.

Question 2:
Right now i am using ArrayList to bind the grid. Is there any limitaion going with object list.

1 Reply

HA haneefm Syncfusion Team July 24, 2007 09:55 PM UTC

Hi Sendil,

Issue 1: Excel Like Cloumn Grouping.

Please refer this.
http://www.syncfusion.com/support/Forums/message.aspx?MessageID=32554

Issue 2:

Using an arraylist (implements IList) as a datasource does not have the same built-in mechanisms for reflecting changes between the datasource and the grid that for example using a DataTable (implements IListSource) does.

This means you have to either implement the extra interfaces, or directly handle things in your code.

For example, if you programatically change your arraylist, and want to see the changes in the grid, then you could force a refresh on the bindingcontext from code.

CurrencyManager cm = (CurrencyManager) this.BindingContext[this.grid.DataSource];
cm.Refresh();

To be updatable, the datasource has to implement IBindingList, and an arbitary ArrayList does not do this. We will look into add some type of IBindingList support for allowing an ArrayList to be updatable.

Also ArrayList does n't support the add new items to the arraylist(IList) through the Grid. If you want this, you should also have your arraylist implement IBindingList to support the addnew functionality directly from the grid. Please refer this sample:

C:\Program Files\Syncfusion\Essential Studio\4.4.0.49\windows\Grid.Grouping.Windows\Samples\CustomCollections\StronglyTypedCollection\

Best Regards,
Haneef

Loader.
Up arrow icon