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
close icon

How to hide or change the table name text

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?

9 Replies

AD Administrator Syncfusion Team 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


AD Administrator Syncfusion Team 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


AD Administrator Syncfusion Team 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


PP Pravin Patel April 24, 2007 05:52 PM UTC

How can I change Grid Group Drop Area bakground color.


HA haneefm Syncfusion Team 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


PP Pravin Patel 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.


HA haneefm Syncfusion Team 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


PP Pravin Patel 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.


PP Pravin Patel April 24, 2007 07:23 PM UTC

I got it. Thanks

Loader.
Live Chat Icon For mobile
Up arrow icon