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.

GridGroupArea

Thread ID:

Created:

Updated:

Platform:

Replies:

35402 Sep 29,2005 02:32 AM Oct 5,2005 03:03 AM Windows Forms 3
loading
Tags: Grouping
Simon Fielke
Asked On September 29, 2005 02:32 AM

When the TableDescriptor.Name on a ggc is changed to a string that is longer than the text that was used to initilize it with, the "Drag a column header here to group by that column" position does not change in accordance. This means the full text of the name is not displayed in the group area. Is there a method to re-position to the "Drag a column header here to group by that column" so that the new TableDescriptor.Name fits? Thanks for your help.

Administrator [Syncfusion]
Replied On September 29, 2005 09:35 AM

Hi Simon, Actually I tried to reproduce the problem 3.2.1 version and 3.3 version but both ran fine. Can u reproduce it in this sample? Which version are you using? Try handling the QueryColWidth event to set the size of that area. The code snippet is private void Model_QueryColWidth(object sender, GridRowColSizeEventArgs e) { if(e.Index == 2 || e.Index == 1) { e.Size=100; e.Handled = true; } } ResizeDropArea.zip Regards, Leo.

Simon Fielke
Replied On September 29, 2005 08:03 PM

Hi Leo, Yes, that works using the QueryColWidth event, thanks for that. Is it possible to get/set the font of the TableDescriptor.Name and to keep it left justified (if you increase the width, the text moves over to the right). Thanks again, Simon

Administrator [Syncfusion]
Replied On October 5, 2005 03:03 AM

Hi Simon, The Font can be changed by setting the font of the GridGroupDropArea and by setting the size of the 2nd column index alone you can avoid the space before Tabledescriptor.Name.The color of the area can be changed by handling the PrepareViewStyleInfo event of the GridGroupDropArea. The code snippets, //setting font this.gridGroupingControl1.GridGroupDropArea.Font=new Font("Times New Roman",9); //avoiding the space before table name private void Model_QueryColWidth(object sender, GridRowColSizeEventArgs e) { if(e.Index == 2) // || e.Index == 1) { e.Size=200; e.Handled=true; } } //setting back color. this.gridGroupingControl1.GridGroupDropArea.PrepareViewStyleInfo +=new GridPrepareViewStyleInfoEventHandler(GridGroupDropArea_PrepareViewStyleInfo); private void GridGroupDropArea_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e) { if(e.ColIndex==2) { e.Style.BackColor=Color.LightBlue; } } Modified sample attached. ResizeDropArea.zip Regards, Leo.

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.

;