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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

XP Style support

Thread ID:

Created:

Updated:

Platform:

Replies:

48305 Aug 24,2006 08:51 AM UTC Nov 23,2006 04:51 AM UTC WinForms 8
loading
Tags: Grouping
Administrator [Syncfusion]
Asked On August 24, 2006 08:51 AM UTC

Hello support,

I would like to use XP style in my application with Grouping Grid control. This grid contains cells with standard controls (TextBox, etc.).

Could you help me with
1. Grid''s borders are not in XP style.
2. Non-selected enbedded controls in grid do not look in XP style.

Version of Syncfusion.Grid.Grouping.Windows.dll is 4.101.0.50

WindowsApplication148.zip

Administrator [Syncfusion]
Replied On August 24, 2006 06:58 PM UTC

Hi Evgeny,

1. Try setting the ThemesEnabled property to true. To have XP flat look on the grid, see the following Kb article. It is for GridDataBoundGrid, but you can implement the same for the GridGroupingControl.
http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=57

2. For modifying the look of the embedded control, you need to modify the borders of the control. Try the following code snippet in your sample.
private Control CreateValueCellControl(NameValue nv)
{
TextBox textBox = new TextBox();
textBox.DataBindings.Add("Text", nv, "Value");
// set the border style of the textbox.
textBox.BorderStyle = BorderStyle.FixedSingle;
return textBox;
}

Let us know if you still face any issues.

Best Regards,
Leo.

Administrator [Syncfusion]
Replied On August 25, 2006 07:30 AM UTC

Hi Leo!

Unfortunately GridGroupingControl does not have neither "BaseStylesMap", nor "Model" properties so I could not use your KB example.

Best Regards,
Evgeny

Administrator [Syncfusion]
Replied On August 25, 2006 11:30 AM UTC

Hi Evgeny,

The GroupingGrid has the BaseStylesMap property in the grid''s TableModel property. But you can use the following piece of code instead.

this.gridGroupingControl1.TableDescriptor.Appearance.AnyGroupCell.CellType="Static";

this.gridGroupingControl1.TableDescriptor.Appearance.AnyHeaderCell.CellType="Static";

GridStyleInfo style = new GridStyleInfo();
GridBorder gb = new GridBorder(GridBorderStyle.Solid, SystemColors.ControlDark);
style.Borders.Bottom = gb;
style.Borders.Right = gb;

this.gridGroupingControl1.TableDescriptor.Appearance.AnyGroupCell.ModifyStyle(style, Syncfusion.Styles.StyleModifyType.Override);

this.gridGroupingControl1.TableDescriptor.Appearance.AnyHeaderCell.ModifyStyle(style, Syncfusion.Styles.StyleModifyType.Override);
//set the borders for all non header cells...

this.gridGroupingControl1.TableModel.Options.DefaultGridBorderStyle = GridBorderStyle.Solid;

Best Regards,
Leo.

Administrator [Syncfusion]
Replied On August 28, 2006 02:48 PM UTC

Hi Leo!

That did not help, see screenshot in attachment. Grid''s borders are still black and embedded textbox is shown with XP style only when it is selected.

WindowsApplication149.zip

Administrator [Syncfusion]
Replied On September 5, 2006 07:06 AM UTC

Hello support!

Have you read my last question?

Administrator [Syncfusion]
Replied On September 5, 2006 11:48 AM UTC

Hi Evgeny,

Our apologies for the delay in response.

You can handle the TableControlDrawCell and draw the cell manually. Also set the BorderStyle property of the textbox control to BorderStyle.None. Here is a code snippet.

//TableControlDrawCell event
e.Inner.Cancel = true;
e.Inner.Renderer.Draw(e.Inner.Graphics,e.Inner.Bounds,e.Inner.RowIndex,e.Inner.ColIndex,e.Inner.Style);

//Draw the Border manually...
Rectangle rect = e.Inner.Bounds;
rect.Offset(-1,-1);
e.Inner.Graphics.DrawRectangle(new Pen(SystemColors.Control),rect);

//CreateValueCellControl method.
textBox.BorderStyle = BorderStyle.None;

Here is a modified sample.
http://www.syncfusion.com/Support/user/uploads/WindowsApplication1_cc8fd8e6.zip

Let me know if this is helps.
Thanks,
Haneef

Administrator [Syncfusion]
Replied On November 10, 2006 03:50 PM UTC

Hello support.

Unfortunately your sample still don't work as expected. DO at least you test your suggested samples?

WindowsApplication161.zip

Administrator [Syncfusion]
Replied On November 23, 2006 04:51 AM UTC

Hi Evgeny,

Our apologies for the delay in response.

Please try the modified sample and let me know if you are looking something different.
ModifiedSample

Thanks for your patience.

Best Regards,
Haneef

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

;