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 Grouping problem

Thread ID:

Created:

Updated:

Platform:

Replies:

63147 Jun 28,2007 02:48 PM Jun 29,2007 05:30 PM Windows Forms 5
loading
Tags: GridControl
Chinedu
Asked On June 28, 2007 02:48 PM

I have a gridgroupingcontrol that allows user to drag a column header to group by those columns.

1.
How do I change the backcolor of this group drop area, i.e the row with the label "Drag a column here to group by that column"

2.
Right before the label with the text "Drag a column here to group by that column" there is the text "Table1". I'd like to get rid of this text also.

haneefm [Syncfusion]
Replied On June 28, 2007 03:24 PM

Hi Nedu,

1)How do I change the backcolor of this group drop area, i.e the row with the label "Drag a column here to group by that column"
>>>>>>>>>>>>>
Below is a forum thread that discuss with the similar issue.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=18850

2)Right before the label with the text "Drag a column here to group by that column" there is the text "Table1". I'd like to get rid of this text also.
>>>>>>>>>>>>>
Use the DragColumnHeaderText property of the GridGroupDropArea to change the group drop area text in a grouping grid. Here is a code snippet.

this.grid.GridGroupDropArea.DragColumnHeaderText = String.Empty;//For Hide the text.

Best regards,
Haneef

Chinedu
Replied On June 28, 2007 04:20 PM

thanks a million for the prompt reply and help...as usual Haneef, you always come thru.

Thanks a million

Chinedu
Replied On June 28, 2007 04:28 PM

A little problem Haneef,

The "Table1" part of the text shows up when data is loaded into the grid.

So on Startup, the grid shows the text I want by use of the code snippet.
GridGroupDropArea.DragColumnHeaderText =
"My new string here";

But once data is loaded into the Grid, it puts the text "Table1" before my preferred text in the dragdrop area

haneefm [Syncfusion]
Replied On June 28, 2007 05:03 PM

Hi Nedu,

The GroupDropArea of the GridGroupingControl, is a collection of GridControls internally with columns in a panel named GroupDropPanel. These columns can be formatted using the PrepareViewStyleInfo event for each of the grids in the GroupDropArea. Below is a code snippet to show this task.

private void ParentTable_PrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventArgs e)
{
if (e.ColIndex == 2 && e.RowIndex == 2)
{
e.Style.Text = "New TableDescriptor Name";
e.Style.Font.Bold = true;
e.Style.BackColor = Color.YellowGreen;
e.Style.TextColor = Color.Blue;
e.Style.CellType = "Static";
e.Style.HorizontalAlignment = GridHorizontalAlignment.Left;
e.Style.Enabled = false;
}
}

Sample : GroupDropFormatting.zip

Best regards,
Haneef

Chinedu
Replied On June 29, 2007 05:30 PM

Thanks a million 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.

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.

;