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

Summary Row label not visible some time

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

7 Replies

UB UBS November 10, 2006 05:52 AM UTC



>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


UB UBS November 10, 2006 07:59 AM UTC



>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


AD Administrator Syncfusion Team November 10, 2006 08:38 AM UTC

Hi Vivek,

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

Best regards,
Haneef


AD Administrator Syncfusion Team November 10, 2006 11:42 AM UTC

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


UB UBS November 10, 2006 03:56 PM UTC

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


UB UBS November 13, 2006 09:27 AM UTC

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


AD Administrator Syncfusion Team November 13, 2006 09:57 AM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon