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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to add a Grid inside a cell

Thread ID:





143271 Mar 12,2019 02:39 PM UTC Mar 13,2019 12:20 PM UTC WinForms 1
Tags: GridGroupingControl
Pavan Kandur
Asked On March 12, 2019 02:39 PM UTC

Is it possible to add the cell type as grid.
I would like to display an information like this,like adding pincodes to the state. 
The issue is list of pincode entries is not known (for e.g) , we keep adding. 
I will not be able to add an entry for each pin.
So it would be great if you provide a means on how to use the grouping grid control , in which 
a the cell of a particular row can have editable grid / list.  What is the clean way to implement this.
Multiline text editing is not user friendly for pincodes column. So Please tell me how do we do this.

State Pincodes
TN    60002

AP   40002

Arulraj A [Syncfusion]
Replied On March 13, 2019 12:20 PM UTC

Hi Pavan, 

Thanks for using Syncfusion product. 

You can achieve your desired behavior by adding the GridControl to the cell using QueryCellStyleInfo event and set the cell type as Control. Set unique GridControl objects for each cell and save/load them respectively. 

this.gridGroupingControl1.Table.DefaultRecordRowHeight = 120; 
this.gridGroupingControl1.TableDescriptor.Columns[3].Width = 80; 
this.gridGroupingControl1.TableDescriptor.Columns["SampleData"].Appearance.AnyRecordFieldCell.CellType = "Control"; 
this.gridGroupingControl1.QueryCellStyleInfo += GridGroupingControl1_QueryCellStyleInfo; 

private void GridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e) 
    if (e.Style.CellType == "Control" && e.Style.Control == null) //e.TableCellIdentity.ColIndex == 4 also works 
        var gc = GetGridControl(e.TableCellIdentity.RowIndex); 
        gc.CurrentCellEditingComplete += Gc_CurrentCellEditingComplete; 
        gc.CurrentCellKeyDown += Gc_CurrentCellKeyDown; 
        e.Style.Control = gc; 


Arulraj A 


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

Live Chat Icon For mobile
Live Chat Icon