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

Outlook Grouping (Without Full Outlook2007 Demo)

I have a simple GGC that support grouping and I just want the grouping style to look like outlook. It's hard to figure out in that huge Outlook 2007 sample how to achieve what I assume is s pretty simple task.

So, can you just show me the properties I need to set on my GGC to get grouping that looks, visually, like the the grouping you have in your outlook demo (I'm hoping I can just apply a visual style and be done).

21 Replies

RA Rajagopal Syncfusion Team June 8, 2007 07:23 PM UTC

Hi Tod,

The VisualStyles can be applied to the GridGroupingControl through the GridVisualStyles property. The below code sets the Office2007Blue skin to the grid. You could also do the same in the design time accesing the tag.

this.gridGroupingControl1.TableOptions.GridVisualStyles = Syncfusion.Windows.Forms.GridVisualStyles.Office2007Blue;

Thanks for your interest in Syncfusion Products.
Have a nice time.

Regards,
Rajagopal


TG Tod Golding June 8, 2007 07:47 PM UTC

Thanks for the help. That got me closer. However, simply setting the style like you suggest doesn't really give the "outlook" style grouping look like you have in your outlook sample.

I'm after the specific look of the outlook grouping example where the heading for each group is just a title with an underline. Setting the style the way you have it here still leaves me with the same old column headers for each group. If you look at the outlook sample and look at at the heading for each group, you'll see what I'm getting at.

There must be some combination of visual styles and other properties that achieve this specific look. I've looked though the outlook example and I just can't find where that aspect of the GGC gets configured to look that way.

Thanks again.

>Hi Tod,

The VisualStyles can be applied to the GridGroupingControl through the GridVisualStyles property. The below code sets the Office2007Blue skin to the grid. You could also do the same in the design time accesing the tag.

this.gridGroupingControl1.TableOptions.GridVisualStyles = Syncfusion.Windows.Forms.GridVisualStyles.Office2007Blue;

Thanks for your interest in Syncfusion Products.
Have a nice time.

Regards,
Rajagopal


RA Rajagopal Syncfusion Team June 12, 2007 06:25 PM UTC

Hi Tod,

Thanks for your patience.

We have added a helper class called ConfigureOutlookStyle in the below sample to achieve this specific outlook style. Please refer to the attached sample.

ConfigureOutlookStyle style = new ConfigureOutlookStyle(this.gridGroupingControl1, GridVisualStyles.Office2007Blue);
style.SwitchToVisualStyles(GridVisualStyles.Office2007Silver);

Here is the sample download link
http://websamples.syncfusion.com/samples/Grid.Windows/F62172/main.htm

Regards,
Rajagopal


TG Tod Golding June 13, 2007 05:00 PM UTC

This was a great help. Thanks. There are still two issues with this solution. If you look at your screenshot, you'll notice that the first cell in the top left corner has a problem. When the grid is grouped, the bottom edge of the header cell is partially missing. I ran the sample and noticed the same thing. I'm hoping there's some small change that can be made to the configuration to make this go away.

The other problem is less important to me right now. When you have a multi-level grouping, the gutter on the left edge of the expanded group is painted with the wrong color. You can ses this by adding more than one level of grouping and expanding the nodes.

>Hi Tod,

Thanks for your patience.

We have added a helper class called ConfigureOutlookStyle in the below sample to achieve this specific outlook style. Please refer to the attached sample.

ConfigureOutlookStyle style = new ConfigureOutlookStyle(this.gridGroupingControl1, GridVisualStyles.Office2007Blue);
style.SwitchToVisualStyles(GridVisualStyles.Office2007Silver);

Here is the sample download link
http://websamples.syncfusion.com/samples/Grid.Windows/F62172/main.htm

Regards,
Rajagopal


TG Tod Golding June 15, 2007 04:54 PM UTC

Has anyone had a chance to look at this?

>This was a great help. Thanks. There are still two issues with this solution. If you look at your screenshot, you'll notice that the first cell in the top left corner has a problem. When the grid is grouped, the bottom edge of the header cell is partially missing. I ran the sample and noticed the same thing. I'm hoping there's some small change that can be made to the configuration to make this go away.

The other problem is less important to me right now. When you have a multi-level grouping, the gutter on the left edge of the expanded group is painted with the wrong color. You can ses this by adding more than one level of grouping and expanding the nodes.

>Hi Tod,

Thanks for your patience.

We have added a helper class called ConfigureOutlookStyle in the below sample to achieve this specific outlook style. Please refer to the attached sample.

ConfigureOutlookStyle style = new ConfigureOutlookStyle(this.gridGroupingControl1, GridVisualStyles.Office2007Blue);
style.SwitchToVisualStyles(GridVisualStyles.Office2007Silver);

Here is the sample download link
http://websamples.syncfusion.com/samples/Grid.Windows/F62172/main.htm

Regards,
Rajagopal


TG Tod Golding June 18, 2007 08:19 PM UTC

Is this still on anyone's radar? I posted some issues with the provided solution (see my comments in this thread) and there hasn't been any feedback since then.

>Hi Tod,

Thanks for your patience.

We have added a helper class called ConfigureOutlookStyle in the below sample to achieve this specific outlook style. Please refer to the attached sample.

ConfigureOutlookStyle style = new ConfigureOutlookStyle(this.gridGroupingControl1, GridVisualStyles.Office2007Blue);
style.SwitchToVisualStyles(GridVisualStyles.Office2007Silver);

Here is the sample download link
http://websamples.syncfusion.com/samples/Grid.Windows/F62172/main.htm

Regards,
Rajagopal


RA Rajagopal Syncfusion Team June 19, 2007 01:37 AM UTC

Hi Tod,

We regret for the inconvenience caused. We will be updating this thread by tomorrow(June 19).

Thanks,
Rajagopal


RA Rajagopal Syncfusion Team June 20, 2007 03:54 AM UTC

Hi Tod,

Thanks for your patience.

The wrong color that you are seeing in the GroupIndentCell when expanded can be resolved by changing following piece of code in the QueryCellStyleInfo event handler in the helper class(ConfigureOutlookStyle).

void myGrid_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if ((e.TableCellIdentity.TableCellType == GridTableCellType.GroupIndentICell) ||
(e.TableCellIdentity.TableCellType == GridTableCellType.GroupIndentLCell) ||
(e.TableCellIdentity.TableCellType == GridTableCellType.GroupIndentTCell))
{
if (myGrid.TableDescriptor.GroupedColumns.Count > 1)
e.Style.BackColor = SystemColors.Window;
}
}

The other problem that you have reported regarding the bottom edge of the header cell, will be updated in a short while.

Regards,
Rajagopal


TG Tod Golding June 20, 2007 07:46 AM UTC

Thanks for the color fix. When you say the problem will be "updated in a short while" what do you mean? Is this a bug that will require a new release or just another fix to your sample code? And, when you say a "short while" are we talking about days, weeks, or months?

Thanks,
Tod

>Hi Tod,

Thanks for your patience.

The wrong color that you are seeing in the GroupIndentCell when expanded can be resolved by changing following piece of code in the QueryCellStyleInfo event handler in the helper class(ConfigureOutlookStyle).

void myGrid_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if ((e.TableCellIdentity.TableCellType == GridTableCellType.GroupIndentICell) ||
(e.TableCellIdentity.TableCellType == GridTableCellType.GroupIndentLCell) ||
(e.TableCellIdentity.TableCellType == GridTableCellType.GroupIndentTCell))
{
if (myGrid.TableDescriptor.GroupedColumns.Count > 1)
e.Style.BackColor = SystemColors.Window;
}
}

The other problem that you have reported regarding the bottom edge of the header cell, will be updated in a short while.

Regards,
Rajagopal


RA Rajagopal Syncfusion Team June 20, 2007 08:08 PM UTC

Hi Tod,

You could resolve this problem of bottom edge of the column header cell missing by handling the TableControlDrawCell event in the helper class. Please add this event handler to the helper class and use the following code.

void myGrid_TableControlDrawCell(object sender, GridTableControlDrawCellEventArgs e)
{
if (e.TableControl.TableDescriptor.GroupedColumns.Count > 0)
{
GridTableCellStyleInfo style = (GridTableCellStyleInfo)e.Inner.Style;
string firstColname = e.TableControl.TableDescriptor.VisibleColumns[0].Name;
if (style.TableCellIdentity.TableCellType == GridTableCellType.ColumnHeaderCell
&& style.TableCellIdentity.Column != null && style.TableCellIdentity.Column.Name == firstColname)
{
style.Borders.Bottom = new Syncfusion.Windows.Forms.Grid.GridBorder(GridBorderStyle.Solid, groupBorderColor, GridBorderWeight.Thick);
}
}
}

Here is the modified sample OutlookGrid1.zip

Let us know if you need any further help.
Regards,
Rajagopal


TG Tod Golding June 21, 2007 06:12 AM UTC

I'm not sure if you looked at this closely, but the solution you provided still doesn't really workaround what has to be a bug. The bottom of the first header cell is still not fully rendered correctly. It's an improvement, but the drawing is still wrong. You've added a little bit of a line to the bottom edge of the header cell, but the bottom doesn't match at all the bottom edges of the other cell. The portion of the cell that's above the "+" expansion button is also thicker than the rest of the header cell's bottom border. This seems like it's a bug that will require more than border drawing tricks to correct.

-Tod

>Hi Tod,

You could resolve this problem of bottom edge of the column header cell missing by handling the TableControlDrawCell event in the helper class. Please add this event handler to the helper class and use the following code.

void myGrid_TableControlDrawCell(object sender, GridTableControlDrawCellEventArgs e)
{
if (e.TableControl.TableDescriptor.GroupedColumns.Count > 0)
{
GridTableCellStyleInfo style = (GridTableCellStyleInfo)e.Inner.Style;
string firstColname = e.TableControl.TableDescriptor.VisibleColumns[0].Name;
if (style.TableCellIdentity.TableCellType == GridTableCellType.ColumnHeaderCell
&& style.TableCellIdentity.Column != null && style.TableCellIdentity.Column.Name == firstColname)
{
style.Borders.Bottom = new Syncfusion.Windows.Forms.Grid.GridBorder(GridBorderStyle.Solid, groupBorderColor, GridBorderWeight.Thick);
}
}
}

Here is the modified sample OutlookGrid1.zip

Let us know if you need any further help.
Regards,
Rajagopal


RA Rajagopal Syncfusion Team June 21, 2007 08:02 PM UTC

Hi Tod,

Thanks for your patience.
I have modified some code in the TableControlDrawCell event handler to avoid this problem. Please check the below sample for more details.

http://www.syncfusion.com/Support/user/uploads/OutLookStyle1_9027be2e.zip

Let us know if this helps.
Regards,
Rajagopal


TG Tod Golding June 24, 2007 01:40 AM UTC

This is still broken. There are two problems now.

1) If I click on a row in the grid and I don't move my mouse, the bottom edge of the top left cell still doesn't render correctly. When you move the mouse, it will eventually render, but that's really not adequate.

2) When you group my more than one column, the underlining of the group headers is not rendered correctly ont he left edge (when they are expanded).

I'm getting concerned about my experience with this particular error. I posted my original concern on 6/10 and each time a new solution is posted, the solution doesn't appear to have been tested and so, almost immediately, I find the solution to be invalid. It's as if the examples never get exercised before they are posted. Each time I get the next attempt, I open it and within seconds find problems. Ultimately, ends up wasting your time and mine.

>Hi Tod,

Thanks for your patience.
I have modified some code in the TableControlDrawCell event handler to avoid this problem. Please check the below sample for more details.

http://www.syncfusion.com/Support/user/uploads/OutLookStyle1_9027be2e.zip

Let us know if this helps.
Regards,
Rajagopal


TG Tod Golding June 27, 2007 08:36 PM UTC

Any idea if anyone is looking at this?

>This is still broken. There are two problems now.

1) If I click on a row in the grid and I don't move my mouse, the bottom edge of the top left cell still doesn't render correctly. When you move the mouse, it will eventually render, but that's really not adequate.

2) When you group my more than one column, the underlining of the group headers is not rendered correctly ont he left edge (when they are expanded).

I'm getting concerned about my experience with this particular error. I posted my original concern on 6/10 and each time a new solution is posted, the solution doesn't appear to have been tested and so, almost immediately, I find the solution to be invalid. It's as if the examples never get exercised before they are posted. Each time I get the next attempt, I open it and within seconds find problems. Ultimately, ends up wasting your time and mine.

>Hi Tod,

Thanks for your patience.
I have modified some code in the TableControlDrawCell event handler to avoid this problem. Please check the below sample for more details.

http://www.syncfusion.com/Support/user/uploads/OutLookStyle1_9027be2e.zip

Let us know if this helps.
Regards,
Rajagopal


TG Tod Golding June 30, 2007 03:50 AM UTC

At this point, I'm assuming I'm not going to get an answer on this. I was just looking for some response that indicated that you were looking into the problem, but I haven't been able to get any response.

>Any idea if anyone is looking at this?

>This is still broken. There are two problems now.

1) If I click on a row in the grid and I don't move my mouse, the bottom edge of the top left cell still doesn't render correctly. When you move the mouse, it will eventually render, but that's really not adequate.

2) When you group my more than one column, the underlining of the group headers is not rendered correctly ont he left edge (when they are expanded).

I'm getting concerned about my experience with this particular error. I posted my original concern on 6/10 and each time a new solution is posted, the solution doesn't appear to have been tested and so, almost immediately, I find the solution to be invalid. It's as if the examples never get exercised before they are posted. Each time I get the next attempt, I open it and within seconds find problems. Ultimately, ends up wasting your time and mine.

>Hi Tod,

Thanks for your patience.
I have modified some code in the TableControlDrawCell event handler to avoid this problem. Please check the below sample for more details.

http://www.syncfusion.com/Support/user/uploads/OutLookStyle1_9027be2e.zip

Let us know if this helps.
Regards,
Rajagopal


AD Administrator Syncfusion Team July 1, 2007 03:28 PM UTC

Hi Tod,
My apologies for the inconvenience caused. If you need a guaranteed response within a day, please submit a Direct-Trac incident. We guarantee an update within 24 hrs. If you are not satisfied with the replies or not getting them in a timely manner, there is an option to escalate the incident to the support managers.

Regarding this issue, we have identified it as a defect and are working on it. We will get this fixed in our library and will provide you a patch within a week. Please open a Direct-Trac incident for the follow up.

https://www.syncfusion.com/Support/DirectTrac/logon.aspx?URL=/Support/DirectTrac/default.aspx

Thanks,
Jay
Syncfusion, Inc.


TG Tod Golding July 13, 2007 06:36 AM UTC

OK...so, your last message on 7/1 suggests that you will "get this fixed in our library and will provide you a patch within a week." It's been well over a week and I haven't heard anything about a patch. I'm concerned that this lack of follow-up will be representative of the kind of support I can expect going forward.

>Hi Tod,
My apologies for the inconvenience caused. If you need a guaranteed response within a day, please submit a Direct-Trac incident. We guarantee an update within 24 hrs. If you are not satisfied with the replies or not getting them in a timely manner, there is an option to escalate the incident to the support managers.

Regarding this issue, we have identified it as a defect and are working on it. We will get this fixed in our library and will provide you a patch within a week. Please open a Direct-Trac incident for the follow up.

https://www.syncfusion.com/Support/DirectTrac/logon.aspx?URL=/Support/DirectTrac/default.aspx

Thanks,
Jay
Syncfusion, Inc.


MA Madhankumar Syncfusion Team July 13, 2007 06:49 PM UTC

Hi Tod,

Our apologies for the delay. The defect needed a change in the core drawing code and needed an insight from our Grid architect. We need to do some further testing and will provide a patch once it is done (2 or 3 days - mid next week). We have created a DTrac incident (35631) and will update the patch in the incident when it is ready.

Best regards,
Madhan


MI Miguel replied to Tod Golding February 15, 2018 02:32 PM UTC

Thanks for the help. That got me closer. However, simply setting the style like you suggest doesn't really give the "outlook" style grouping look like you have in your outlook sample.

I'm after the specific look of the outlook grouping example where the heading for each group is just a title with an underline. Setting the style the way you have it here still leaves me with the same old column headers for each group. If you look at the outlook sample and look at at the heading for each group, you'll see what I'm getting at.

There must be some combination of visual styles and other properties that achieve this specific look. I've looked though the outlook example and I just can't find where that aspect of the GGC gets configured to look that way.

Thanks again.

>Hi Tod,

The VisualStyles can be applied to the GridGroupingControl through the GridVisualStyles property. The below code sets the Office2007Blue skin to the grid. You could also do the same in the design time accesing the tag.

this.gridGroupingControl1.TableOptions.GridVisualStyles = Syncfusion.Windows.Forms.GridVisualStyles.Office2007Blue;

Thanks for your interest in Syncfusion Products.
Have a nice time.

Regards,
Rajagopal

62172


MG Mohanraj Gunasekaran Syncfusion Team February 16, 2018 09:06 AM UTC

 Hi Miguel, 
 
Thanks for using Syncfusion product. 
 
Now, GridGroupingControl does have the support for Metro theme style. And, also Outlook demo sample has available in Syncfusion Dashboard. Please refer the sample in below location, 
 
Sample location 
<Syncfusion_build_installed_location>\Syncfusion\EssentialStudio\[Build_Version]\Windows\Showcase\Outlook Demo\CS 
 
Screenshot 
 
 
Please refer the below documentation link to know more about the Metro theme style, 
 
Please let us know if you have any concerns. 
 
Regards, 
Mohanraj G 
 
 
 



PG Peter Groft February 3, 2023 07:54 AM UTC

Open Outlook. In the View tab at the top of the screen, check the Show as Conversations box. This will group together emails by conversation. You can play around with the Conversation Settings to find what works best for you.

Regards,
Peter


Loader.
Live Chat Icon For mobile
Up arrow icon