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

GGC Row height

Hello,

1.Is there a way to configure "row style" ?
I would like that all records (data rows in grid) would have a height of xx and all HeaderRows would have a height of yy, is there a way to configure it once (something similar to configuring cell
style info) ?

2.How do I add an stacked header with Empty Header text (without
using " ", but intead something like string.Empty or null), currently I when I set StackedHeader.HeaderText = null/string.Empty I get StackedHeader.Name to appear as HeaderText ?

10x.



4 Replies

RG Ruslan Gasanbekov January 27, 2010 07:54 PM UTC

Got another question

3.Is there a way to set cell.CellTipText text-alignment
(I need it aligned to right)?

10x again.


JJ Jisha Joy Syncfusion Team January 28, 2010 09:30 AM UTC

Hi Ruslan,

1. By default, the GridGroupingControl does not support individual row heights. But you could implement this feature(re-sizing individual rows) in GridGroupingControl by adding the instance of the AllowResizingIndividualRows class to the GridEngineFactory. You need to add the dll Syncfusion.GridHelperClasses.Windows dll to your project to make use of this class.


GridEngineFactory.Factory = new Syncfusion.GridHelperClasses.AllowResizingIndividualRows();

Sample from Dashboard:

Grid.grouping Samples --- > grouping Grid Layout --- > Resizeable Rows Demo

2. You could make the stack header cell empty by using the following code:

gridStackedHeaderDescriptor1.HeaderText = " ";


3. There is no property available to get this done. One thing you could done is to have a supertooltip for cells instead of the cellTipText and align the text as you wish.


Please let me know if you have any further queries.

Regards,
Jisha



RG Ruslan Gasanbekov January 31, 2010 07:00 PM UTC


10x for the answers.

Can you show me how to set cell's tooltip to be SuperToolTip ?

10x.


JJ Jisha Joy Syncfusion Team February 1, 2010 07:22 AM UTC

Hi Ruslan,

In order to use SuperToolTip in GridGroupingControl, you need to use ToolTipInfo class which holds the information to be displayed using SuperToolTip control.
Once the information part is formatted with the help of ToolTipInfo object, then SuperToolTip Show() method can be called by passing ToolTipInfo object as argument to it to display the information.

To see the SuperToolTip implementation focus the grid and move the mouse over its cell.


\\ Event :
this.gridGroupingControl1.TableControlCellMouseHover += new GridTableControlCellMouseEventHandler(gridGroupingControl1_TableControlCellMouseHover);

\\ Handler :

int row, col;
GridCurrentCell cc = this.gridGroupingControl1.TableControl.CurrentCell;

if (cc.RowIndex >= 1 && cc.ColIndex >= 1)
{
if (this.gridGroupingControl1.TableControl.PointToRowCol(new Point(e.Inner.MouseEventArgs.X, e.Inner.MouseEventArgs.Y), out row, out col) && (col != hooverCol || row != hooverRow))
{
hooverCol = col;
hooverRow = row;

Rectangle rect = this.gridGroupingControl1.TableControl.GetCellRenderer(row, col).GetCellBoundsCore(row, col, false);
Point screenPoint = this.gridGroupingControl1.TableControl.PointToScreen(new Point(rect.Left, rect.Top));

// This class is used to hold the formatted information to be passed to Show() of SuperToolTip control.
ToolTipInfo tinfo = new ToolTipInfo();

tinfo.Body.Text = string.Format("Body Section:");
tinfo.Header.Text = string.Format("Header Text: row {0}, column {1}", hooverRow, hooverCol);
tinfo.Footer.Text = string.Format("Footer section;");
tinfo.BackColor = Color.Red;
tinfo.BorderColor = Color.Green;
tinfo.ForeColor = Color.Black;
// This will show the separator line like as we have in file menu of MS Office
tinfo.Separator = true;

// This displays the formatted information stored in the tooltipinfo object
superToolTip1.Show(tinfo, screenPoint, 3000);
}
}


Please find the sample:

http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=64026(SuperToolTipsInGridGroupingControl)843987632.zip

Regards,
Jisha

Loader.
Live Chat Icon For mobile
Up arrow icon