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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Changing header row size for child table.

Thread ID:





79696 Feb 21,2009 04:55 AM UTC Feb 23,2009 06:25 AM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On February 21, 2009 04:55 AM UTC

Hi All,

I am looking for the below things.Can someone please advise.

1. How to change the child's table header row size.
2. How to apply a conditional formatting on just the cell that meets the criteria and not the entire row.eg we can have a conditional format but it allows only to change the appearance of anyrecord field cell.Whereas i am more interedted in doing just for the cell that meets the filter criteria.
3. on disable the cells for editing i am not able to navigate through columns using right/left arrow key.I would ideally like the grid to be not editable but still be able to navigate through the cells.

Any help will be really appreciated.

Many thanks.

Jisha Joy [Syncfusion]
Replied On February 23, 2009 06:25 AM UTC

Hi Gurtaran,

Issue 1: Row Height

By default resizing of individual rows is not supported in GridGroupingControl. But the desired behavior can be achieved by using a CustomEngine. Please refer the following sample in our sample browser
..\\My Documents\Syncfusion\EssentialStudio\{version number}\Windows\Grid.Grouping.Windows\Samples\2.0\FeaturedSamples\ResizableRows\cs

This sample demonstrates the features of re-sizing individual rows in the grid. It also illustrates how to implement the "IGridRowHeight" interface and it's routines for getting and setting row heights for elements.

Issue 2: Apply styles to individual cells

In GridGroupingControl you need to handle either QueryCellStyleInfo or PrepareViewStyleInfo for applying styles at cell level. Please see the code:

this.gridGroupingControl1.QueryCellStyleInfo += new Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventHandler(gridGroupingControl1_QueryCellStyleInfo);
this.gridGroupingControl1.TableControl.PrepareViewStyleInfo += new GridPrepareViewStyleInfoEventHandler(TableControl_PrepareViewStyleInfo);

void TableControl_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
if(e.RowIndex== 5 && e.ColIndex==30
e.Style.BackColor = Color.Green;

void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
if (e.TableCellIdentity.ColIndex == 2 && e.TableCellIdentity.RowIndex == 5)
e.Style.BackColor = Color.Red;

Issue 3: The grid to be not editable but still be able to navigate through the cells.

This can be achieved by using the following code snippets.

this.gridGroupingControl1.TableDescriptor.AllowEdit = false;
this.gridGroupingControl1.TableDescriptor.AllowNew = false;

Please let me know if you have any questions.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon