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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

move group header rows horizontally

Thread ID:

Created:

Updated:

Platform:

Replies:

47430 Aug 4,2006 03:40 AM Aug 7,2006 06:47 AM Windows Forms 3
loading
Tags: Grouping
Mario
Asked On August 4, 2006 03:40 AM

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

Administrator [Syncfusion]
Replied On August 4, 2006 09:14 AM

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

Mario
Replied On August 4, 2006 09:38 AM

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

Administrator [Syncfusion]
Replied On August 7, 2006 06:47 AM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;