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.

Summary Row label not visible some time

Thread ID:

Created:

Updated:

Platform:

Replies:

51485 Nov 7,2006 01:16 AM Nov 13,2006 04:57 AM Windows Forms 7
loading
Tags: GridControl
UBS
Asked On November 7, 2006 01:16 AM

Hi,

some time Summary row lable is not visible properly, and some time only few word out of it is visible.
pls check in attachment

Regards
Vivek

summary1.zip

UBS
Replied On November 10, 2006 12:52 AM



>Hi,

some time Summary row lable is not visible properly, and some time only few word out of it is visible.
pls check in attachment

Regards
Vivek

summary1.zip

UBS
Replied On November 10, 2006 02:59 AM



>Hi,

some time Summary row lable is not visible properly, and some time only few word out of it is visible.
pls check in attachment

Regards
Vivek

summary1.zip

Administrator [Syncfusion]
Replied On November 10, 2006 03:38 AM

Hi Vivek,

We will work out for a solution and let you know the details soon. Thanks for being patience.

Best regards,
Haneef

Administrator [Syncfusion]
Replied On November 10, 2006 06:42 AM

Hi Vivek,

One way you can do this is to add the Label control on the grid and handle a TableControlDrawCell event to set required property(like Location,Size,Text and BackColor) of the Label. Here is a code snippet to show this.

private void gridGroupingControl1_TableControlDrawCell(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlDrawCellEventArgs e)
{
GridTableCellStyleInfo style = e.Inner.Style as GridTableCellStyleInfo;
if( style.TableCellIdentity.TableCellType == GridTableCellType.SummaryTitleCell )
{
e.Inner.Cancel = true;

string sText = e.Inner.Style.Text;
this.label1.Text = e.Inner.Style.Text;
this.label1.Location = new Point(e.Inner.Bounds.Location.X,e.Inner.Bounds.Location.Y +2) ;
this.label1.BackColor = e.Inner.Style.BackColor;
int width = (int)e.Inner.Graphics.MeasureString(sText,e.Inner.Style.GdipFont).Width;
this.label1.Size = new Size(width + 1,e.Inner.Bounds.Height - 3 );
}
}

Here is a sample.
http://www.syncfusion.com/Support/user/uploads/GGCSummaryLabel_7bede63f.zip

Best Regards,
Haneef

UBS
Replied On November 10, 2006 10:56 AM

Hi,

Pls see the attached pics, and senario is like, grid is in penal and data of the grid is keep on changing with other events(like: tree node selection). as scrollbar is coming into the grid, the summary lable is displacing from its location.

pls take it on priority.

Thanks
Vivek

>Hi Vivek,

One way you can do this is to add the Label control on the grid and handle a TableControlDrawCell event to set required property(like Location,Size,Text and BackColor) of the Label. Here is a code snippet to show this.

private void gridGroupingControl1_TableControlDrawCell(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlDrawCellEventArgs e)
{
GridTableCellStyleInfo style = e.Inner.Style as GridTableCellStyleInfo;
if( style.TableCellIdentity.TableCellType == GridTableCellType.SummaryTitleCell )
{
e.Inner.Cancel = true;

string sText = e.Inner.Style.Text;
this.label1.Text = e.Inner.Style.Text;
this.label1.Location = new Point(e.Inner.Bounds.Location.X,e.Inner.Bounds.Location.Y +2) ;
this.label1.BackColor = e.Inner.Style.BackColor;
int width = (int)e.Inner.Graphics.MeasureString(sText,e.Inner.Style.GdipFont).Width;
this.label1.Size = new Size(width + 1,e.Inner.Bounds.Height - 3 );
}
}

Here is a sample.
http://www.syncfusion.com/Support/user/uploads/GGCSummaryLabel_7bede63f.zip

Best Regards,
Haneef

error49.zip

UBS
Replied On November 13, 2006 04:27 AM

can any one address this

>Hi,

some time Summary row lable is not visible properly, and some time only few word out of it is visible.
pls check in attachment

Regards
Vivek

summary1.zip

Administrator [Syncfusion]
Replied On November 13, 2006 04:57 AM

Hi Vivek,

You can handle the TableControl.ViewLayout.LayoutChanged event and change the visiblity of the Label control in a grid. Here is a code snippet.

//Form load..
this.gridGroupingControl1.TableControl.ViewLayout.LayoutChanged +=new EventHandler(ViewLayout_LayoutChanged);
private void ViewLayout_LayoutChanged(object sender, EventArgs e)
{
GridViewLayout layout = sender as GridViewLayout;
bool LabelVisible = layout.VisibleCellsRange.IntersectsWith(GridRangeInfo.Cell(SummaryRow,1));
if(!LabelVisible)
this.label1.Hide();
else
this.label1.Show();
}

Sample : http://www.syncfusion.com/Support/user/uploads/GGCSummaryLabel_7bede63f.zip

Best Regards,
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.

;