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.

Grid Group Control Formatting

Thread ID:

Created:

Updated:

Platform:

Replies:

89594 Aug 29,2009 03:40 AM Sep 19,2009 05:32 AM ASP.NET Web Forms (Classic) 8
loading
Tags: Grouping
Domnic Coutinho
Asked On August 29, 2009 03:40 AM

Hi,

I am new to Syncfusion and using v7.2.0.20, I want to do following things with GGC. Please check the following attachment. I want to overwrite the autoformat option within GGC, instead of Office Blue 2007, want to use my own custom skin. Kindly Help.

1)Want to add border lines between records

2)Add images instead of pointers

Thank you for your patience.



service_9834a5ab.JPG

Domnic Coutinho
Replied On August 29, 2009 05:52 AM

Anybody using version 7.2.0.20

Rekha P [Syncfusion]
Replied On September 3, 2009 09:13 AM

Hi Derik,

Thank you for your interest in Syncfusion Products.

1)Want to add border lines between records

The property Borders is used to specify border style for each Grid cell through QueryCellStyleInfo event handler, as it occurs for each cell before this control renders it and lets users customize the display of cells. The GridLines property will be overridden by the CSS applied and hence this can be achieved through this event. Please refer the code snippet below to achieve this.

void GridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if (e.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell ||
e.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordFieldCell)
{
e.Style.Borders.All = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.DashDotDot, Color.Blue);
e.Handled = true;
}
}


2)Add images instead of pointers

This can be achieved by disabling the RowHeader and adding edit or delete rows using the GridRowEditUpdateLink item template. Please refer our online sample below illustrating your requirement.



http://samples.syncfusion.com/ASPNET/7.3.0.20/web/Grid.Grouping.Web/samples/3.5/CRUDOperations/EditorDeleteColumns/cs/editordeletecolumn.aspx

Please let me know if you have any concerns.

Thanks,
Rekha

Domnic Coutinho
Replied On September 4, 2009 07:52 AM

Hi Rekha,

Thanks for the update.

Could add images, but while adding borders it gets a bit tricky.

Im trying this example on Web and not windows, so the GridBorder option is not generated under Syncfusion.Web.UI.WebControls.Grid.Grouping.




Domnic Coutinho
Replied On September 4, 2009 08:04 AM

Also the code given doesnt have any solution file, do i need to create a new solution and add these file from Sample.zip

Wanted to run the solution u have attached and check.


Thanks

Rekha P [Syncfusion]
Replied On September 8, 2009 09:41 AM

Hi Domnic,

We have a common base class (Syncfusion.Windows.Forms.Grid) for some properties for both Grid Windows and Grid Web. So this Borders property is also inherited from Windows Forms base class. Please find the sample solution file illustrating border lines between records.

http://files.syncfusion.com/support/GGC.Web/7.3.0.20/F89594/Sample.zip

Please have a look at the above sample and let me know if you have any concerns.

Thanks,
Rekha

Domnic Coutinho
Replied On September 9, 2009 05:51 AM

Oh thanks a lot, that worked. Still had a small query -

Im using Syncfusion.Windows.Forms.Grid.GridBorderWeight.Thin to use the border lines as thin as possible.

1) Can i use more thinner lines ?
2) Is it possible to use hexadecimal coloring schema ?

Domnic Coutinho
Replied On September 16, 2009 01:28 AM

Any Updates ?

Rekha P [Syncfusion]
Replied On September 19, 2009 05:32 AM

Hi Domnic,

Yes, you can use border lines to more thin and hexadecimal for border colors. Please refer the code snippet below to achieve this.

e.Style.Borders.All = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.DashDotDot, System.Drawing.ColorTranslator.FromHtml("#7DB32D"), Syncfusion.Windows.Forms.Grid.GridBorderWeight.ExtraThin);
e.Handled = true;


Thanks,
Rekha

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.

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.

;