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

Text color in header column

Thread ID:

Created:

Updated:

Platform:

Replies:

78139 Dec 1,2008 03:48 PM UTC Dec 11,2008 11:15 AM UTC ASP.NET Web Forms (Classic) 5
loading
Tags: GridGroupingControl
Administrator [Syncfusion]
Asked On December 1, 2008 03:48 PM UTC

Hi,

I'm using Essential Studio 6.3.0.30 with VS2008.

I'd like to use the GridGroupingControl, but I've got a problem with the look. I'd like to have my column header with white text, but whatever I do, it's still black.

I've tried to method :

CSS file :
In my css file :

.GgcCadre
{
color: white;
font-size: 15pt;
font-weight:bold;
background-color: #3596C3;
}

In my aspx file :

DataSourceCachingMode="ViewState" CellPadding="3" ShowGroupDropArea="false" Width="97%" CssClass="Ggc">












I've to say that the backcolor works great. But I've the same problem with the border (I can't apply style to it).

The second method I tried is :
In my vb file :

Protected Sub GGC_Design_QueryCellStyleInfo(ByVal sender As Object, ByVal e As GridTableCellStyleInfoEventArgs) Handles GGC_Design.QueryCellStyleInfo
If e.TableCellIdentity.TableCellType = GridTableCellType.ColumnHeaderCell Then
e.Style.TextColor = Color.White
End If
End Sub

It doesn't work either.

Have you got any idea for me please ?

Thanks a lot for your help.

LyLy




Rajarajeswari S [Syncfusion]
Replied On December 2, 2008 02:08 PM UTC

Hi LyLy,

Thanks for using Syncfusion products.


Please refer the below code snippet for applying TextColor for the Column headers:

.GridBlueColumnHeaders
{
border-style: none;
background-color: #5898c5;
font: 700 11px Tahoma;


padding-left: 5px;
color: White;
cursor:default;
}
.GridBlueColumnHeadersText
{
font: 700 11px Tahoma;
color: White;
}


ASPX Code:



Please refer the sample from the below link, which illustartes this:

http://www.syncfusion.com/support/user/uploads/Sample_a0dc4af2.zip

Please let me know if you have any other concerns.

Regards,
Raji



Lucie Houel
Replied On December 3, 2008 10:03 AM UTC

Hi Raji,

Thanks a lot for your help. It works great for the white text in the headers.

Unfortunately, I can't apply style to borders. The css properties for the borders only work for : GridBlueGrid and GridBlueColumnHeadersText. So I can't apply style to my header cells and my row cells border.

Thanks again.

LyLy


Rajarajeswari S [Syncfusion]
Replied On December 8, 2008 09:39 AM UTC


Hi LyLy,

Thanks for using Syncfusion products.

Borders can be applied to GridGroupingControl through QueryCellStyleInfo event like below:

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


Please try like this and let me know if this helps you out.

Regards,
Raji


Lucie Houel
Replied On December 9, 2008 01:18 PM UTC

Hi Raji,

No it doesn't work for me, but I don't know the vb equivalent of :

e.Handled = true;

So I remove this line, does it possibly come from it ?

Thanks for your help.

LyLy


Rajarajeswari S [Syncfusion]
Replied On December 11, 2008 11:15 AM UTC

Hi LyLy,

Thanks for using Syncfusion products.

Could you please DownLoad our latest version and check this. It is working fine with our latest version. Please refer the sample from the below link, which illustrates this:


http://websamples.syncfusion.com/samples/Grid.Web/6.4.0.15/GGC_Web_Border/main.htm


"Handled" is a propert included recently to apply the formattings set through the QueryCellStyleInfo event.


Please refer the below link, to download our latest version, which has lots of features implemented and also has many fixes:


http://www.syncfusion.com/downloads/default.aspx


Please try this and let me know if this helps you out.


Note:

Could you please create an DirectTrac Incident using your DirectTrac account for future support?

Regards,
Raji



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

;