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.
Syncfusion Feedback

GridGroupingControl - AutoSize of RecordFieldCells

Thread ID:

Created:

Updated:

Platform:

Replies:

48782 Sep 4,2006 06:08 PM UTC Sep 14,2006 12:10 PM UTC Windows Forms 10
loading
Tags: GridControl
Badri Rajani Kanth
Asked On September 4, 2006 06:08 PM UTC

Hi,

We are using GridGroupingControl v 3.2.1.0.

In my grid, some of the columns are having large data. So, is it possible to display all the data in the cell, by auto sizing all rows. Always cell width should remain same, but height should change.

For example, if the data can fit in 2/3 lines in a cell, then height of all other cells in a row should change. And next row can be of different height, depending on cell data.

Any help please.

Rgds
Rajani Kanth

Administrator [Syncfusion]
Replied On September 5, 2006 03:56 AM UTC

Hi Rajani,

The Attached sample demonstrates the feature resizing individual rows in the grid. It also implements the IGridRowHeight interface and its routines for getting,setting and preventing row height for elements. Please find the sample below.

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

For more details, See the ResizableRows browser sample.
Syncfusion\Essential Studio\4.2.0.37\windows\Grid.Grouping.Windows\Samples\ResizableRows\

Let me know if you need any further assistance.
Best Regards,
Haneef

Badri Rajani Kanth
Replied On September 5, 2006 10:54 AM UTC

Thank You Haneef,

Itz working fine.

We are already having Syncfusion v 3.2.1.0 license.

From your sample, we want to use "CustomEngine.cs" file as part of our application. We will build the application and re-destribute the DLLs to our client.

Can you explain me how to get the required license from Syncfusion for this?

Rgds
Rajani Kanth Badri

Administrator [Syncfusion]
Replied On September 5, 2006 12:14 PM UTC

Hi Rajani,

Thanks for your update.

The "CustomEngine.cs" is helper class file. If you want this file, you can copy and paste into your project. Thanks for choosing Syncfusion Products.

Best Regards,
Haneef

Badri Rajani Kanth
Replied On September 5, 2006 01:15 PM UTC

Thank You Haneef.

Rgds
Rajani Kanth Badri

Badri Rajani Kanth
Replied On September 5, 2006 03:06 PM UTC

Hi Haneef,

Itz working fine in your and my sample apps. But when I apply this in our real application where there are many grids, itz not working.

Also I want to apply feature to only selected grids. Not all. So, I am trying with below code for each grid. But no luck yet.

GroupingEngineFactory groupingEngineFactory = new GroupingEngineFactory();
this.gridGroupingControl1.Engine = groupingEngineFactory.CreateEngine() ;

Any input?

Rgds
Rajani Kanth

Administrator [Syncfusion]
Replied On September 6, 2006 03:45 AM UTC

Hi Rajani,

To localize GridEngineFactory, You need to pass the GridEngine object to the GroupingControl constructor in Form''''s IntializeComponet method . Here is a code snippet.

//To apply the Custom Engine to the grid...
this.gridGroupingControl1 = new GridGroupingControl( new CustomGroupingEngineFactory().CreateEngine() );

//For normal grid...
this.gridGroupingControl1 = new GridGroupingControl();

Please refer the below forum thread for more detail.
http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=46314

Thanks,
Haneef

Badri Rajani Kanth
Replied On September 14, 2006 09:13 AM UTC

HI Haneef,

Without using the CustomEngine.cs file also, the below code is working fine for AutoSize of RecordFieldCells.

grdSlots.TableDescriptor.AllowCalculateMaxColumnWidth = false;
GridTableModel gridTableModel = grdSlots.TableModel ;
gridTableModel.RowHeights.ResizeToFit(
GridRangeInfo.Table(), GridResizeToFitOptions.NoShrinkSize);

So, I am wondering if we need to use the file still..What exactly is the purpose of that file?

Rgds
Rajani Kanth

Administrator [Syncfusion]
Replied On September 14, 2006 09:56 AM UTC

Hi Rajani,

Currently, there is no built-in support for setting the individual rowheight for the record in a GroupingGrid ( It supports the autorowheight for all records ). The "CustomEngine" is used to set individual rowheight for the record and let me know if you need any further assistance.

Thanks,
Haneef

Badri Rajani Kanth
Replied On September 14, 2006 11:59 AM UTC

Thank You Haneef,

Yes. I observed that.

I am using GridEngineFactory.Factory = new GroupingEngineFactory(); and it is displaying fine.

But the problem with that line of code is, when I am trying to get grid settings xml, it is throwing error.

StringBuilder sb = new StringBuilder();
StringWriter sw = new StringWriter(sb);
XmlTextWriter xw = new XmlTextWriter(sw);

gridGroupingControl1.WriteXmlSchema(xw);
xw.Close();
sw.Close();

string xml =sb.ToString();

Throwing the below error at "gridGroupingControl1.WriteXmlSchema(xw);"

An unhandled exception of type ''System.InvalidOperationException'' occurred in system.xml.dll

Additional information: There was an error generating the XML document.

Rgds
Rajani Kanth

Administrator [Syncfusion]
Replied On September 14, 2006 12:10 PM UTC

Hi Rajani,

Sorry for the inconvenience caused.

This is a known issue and has been reported in the following link.

http://www.syncfusion.com/support/issues/grid/Default.aspx?ToDo=view&questId=2348.

You can view the status of the bug fix at the above link. We will try our very best to address the same at the earliest.

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.

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

;