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

How to hide or change the table name text

Thread ID:

Created:

Updated:

Platform:

Replies:

19661 Sep 30,2004 06:07 PM UTC Apr 24,2007 07:23 PM UTC WinForms 9
loading
Tags: Grouping
Administrator [Syncfusion]
Asked On September 30, 2004 06:07 PM UTC

I noticed in the grouping drop area, table name is displaying before "Drag a column header here to group by that column". How can I not display it or change the table name to other text?

Administrator [Syncfusion]
Replied On October 1, 2004 06:37 AM UTC

The droparea is actually a little grid. And these text entries are being set in the model.OnQueryCellInfo method for that grid. So, for now, to change these values, you have to derive this model class and override its OnQueryCellInfo. (In the future, maybe we can do something to make this easier - allowing an event that you could handle to set them - but for now, you have to subclass the model.) Here is a little sample showing how you can do it. GGCHeaderText_8578.zip

Administrator [Syncfusion]
Replied On October 1, 2004 09:47 AM UTC

It turns out you can also do this by handling the GridGroupDropArea''s PrepareViewStyleInfo event. This would not require deriving the model. Here is a sample

Administrator [Syncfusion]
Replied On October 1, 2004 02:45 PM UTC

I used your sample code in GridGroupDropArea''s PrepareViewStyleInfo . Now my program works well. I prefer this way rather than the model way. Thank you for help. >It turns out you can also do this by handling the GridGroupDropArea''s PrepareViewStyleInfo event. This would not require deriving the model. >Here is a sample

Pravin Patel
Replied On April 24, 2007 05:52 PM UTC

How can I change Grid Group Drop Area bakground color.

haneefm [Syncfusion]
Replied On April 24, 2007 06:29 PM UTC

Hi,

The droparea is a little grid. So, you can handle its PrepareViewStyleInfo event, and explicitly set a backcolor there.

this.gridGroupingControl1.GridGroupDropArea.PrepareViewStyleInfo += new GridPrepareViewStyleInfoEventHandler(GridGroupDropArea_PrepareViewStyleInfo);

//the handler
private void GridGroupDropArea_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
{
e.Style.BackColor = Color.Red;
}

Best regards,
Haneef

Pravin Patel
Replied On April 24, 2007 06:45 PM UTC

This does not work...
e.Style.BackColor is property to get BackColor does not allow to set the color.

haneefm [Syncfusion]
Replied On April 24, 2007 06:53 PM UTC

Hi,

Try setting these two properties.

this.gridGroupingControl1.GridGroupDropArea.Dock = DockStyle.Fill;
this.gridGroupingControl1.GridGroupDropArea.Model.Properties.BackgroundColor = Color.Red;

Here is a sample with the alpha blend selection set ok as well as coloring the group drop area.
GGCGroupDropAreaSample

Best regards,
Haneef

Pravin Patel
Replied On April 24, 2007 07:11 PM UTC

I can see in your sample it's red.
Now I have red background, but still the area where It says "My Table Drag a column header..." still has DarkControl background.

Pravin Patel
Replied On April 24, 2007 07:23 PM UTC

I got it. Thanks

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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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

;