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

move group header rows horizontally

I am working with a GridGroupingControl of the current version. The enclosed images show what I try to achieve and what I currently have.

How can I move the complete group header row to the right or, respectively, how can I show columns BEFORE the plus/minus button?

If this is not possible: how can I add my own controls to row header cells? I would then try to insert a checkbox and a button into each row header cell to simulate the first columns before the plus/minus button as shown in the attached image.

Thanks for your help.


Images13.zip

3 Replies

AD Administrator Syncfusion Team August 4, 2006 01:14 PM UTC

Hi Mario,

There is a no built-in support for moving the GroupCaptioncell.

If you need one instance of your control to be shared among many rowheader cells, then the simplest and most efficient way is to derive a model class and a renderer class that uses your control. You can look at the slider or calendar samples in the CellTypes sample to see how to go about it.

Also this sample will give you an idea on how to go about this.
C:\Program Files\Syncfusion\Essential Studio\4.2.0.37\Windows\Grid.Windows\Samples\In Depth\DropDownFormAndUserControlSample.

After adding the your cell model in a grid , you can use the QueryCellStyleInfo event to change RowHeader cell to usercontrol cell type in a grid. Here is a code snippet

private void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
{
if( e.TableCellIdentity.TableCellType == GridTableCellType.RowHeaderCell )
{
e.Style.CellType = "CheckBox";
}
}

Let me know if this helps.
Thanks
Haneef


MA Mario August 4, 2006 01:38 PM UTC

Hello Haneef,
thanks for your help. I will try this.

I have already seen this renderer and model derivative stuff in other examples.

However, why is it necessary to write so much code just to insert a control into a cell? It would be much easier, if I could write

myCell.Controls.Add(myControl);

Regards, Mario


>Hi Mario,

There is a no built-in support for moving the GroupCaptioncell.

If you need one instance of your control to be shared among many rowheader cells, then the simplest and most efficient way is to derive a model class and a renderer class that uses your control. You can look at the slider or calendar samples in the CellTypes sample to see how to go about it.

Also this sample will give you an idea on how to go about this.
C:\Program Files\Syncfusion\Essential Studio\4.2.0.37\Windows\Grid.Windows\Samples\In Depth\DropDownFormAndUserControlSample.

After adding the your cell model in a grid , you can use the QueryCellStyleInfo event to change RowHeader cell to usercontrol cell type in a grid. Here is a code snippet

private void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
{
if( e.TableCellIdentity.TableCellType == GridTableCellType.RowHeaderCell )
{
e.Style.CellType = "CheckBox";
}
}

Let me know if this helps.
Thanks
Haneef


AD Administrator Syncfusion Team August 7, 2006 10:47 AM UTC

Hi Mario,

By default, when you try to set control celltype to row/column in gridgroupingcontrol, then a single object of the control will be created for the whole row/column in grid. To avoid this, you need to implement a Model class and a Renderer class for your custom control as decribed by Haneef.

Thanks for using Syncfusion Products.
Regards,
Rajagopal

Loader.
Live Chat Icon For mobile
Up arrow icon