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

User controls inside nested grids

Hi

Is it possible to host user controls inside the GridGroupingControl in any of the main or sub groups.  I know it is possible on the normal grid, but am finding it difficult to see how to achieve the same thing in this control.

I have several user controls to use for lookups, dates and some text input, so they will need to be hosted in different columns.

Can you please provide an example that shows how to do this.

Thanks, Steve

3 Replies

PM Piruthiviraj Malaimelraj Syncfusion Team July 10, 2017 10:10 AM UTC

Hi Steve,  
 
Thanks for your interest in Syncfusion products.  
 
We could able to understand your scenario and prepared the simple sample as per your scenario. In order to set the user controls in a column of GridGroupingControl, CellType and Control properties of GridStyleInfo of that column can be used. Please make use of the below code and refer to the attached sample,  
 
Code example:  
this.gridGroupingControl1.TableDescriptor.Columns[2].Appearance.AnyRecordFieldCell.CellType = GridCellTypeName.Control;  
this.gridGroupingControl1.TableDescriptor.Columns[2].Appearance.AnyRecordFieldCell.Control = new CustomControl();  
  
this.gridGroupingControl1.TableDescriptor.Columns[1].Appearance.AnyRecordFieldCell.CellType = GridCellTypeName.Control;  
this.gridGroupingControl1.TableDescriptor.Columns[1].Appearance.AnyRecordFieldCell.Control = new CustomCalendar();  
  
Sample link:  
 
Regards,  
Piruthiviraj  



SC Steve Cox July 10, 2017 08:30 PM UTC

Thanks for your reply however we need more information.  This is from my programmer.

Ok fine. This show me how to put a control in a cell.

But it is incomplete.

Assuming my control has a Value property (which obviously it has), where and how do I move the cell value into my control, and where and how do I move the edited value from my control back into the cell and the underlining data source?

The problem that I am having with this control is that the samples seem to assume you already know how to use the grid, which I don’t, and there are a zillion often strangely named properties and methods. How am I supposed to know where to look to make it do what I want.

That’s why I need a ‘complete’ example. The one they sent you doesn’t show how to make the checkbox control or the date control that they have used interact with the data in the grid. And searching on the web or looking at the samples that I have found doesn’t help either. Once I figured out how to use their databoundgrid I thought we had cracked it. But this gridgroupcontrol is not even vaguely the same.

Expand a top group. Click on one of the Description cells (not the new row one). Then click on the new row description cell. It uses the built in editor not our one. How am I supposed to work out how to fix that!?!


Are you able to assist with a more complete example that demonstrates how to get the values into the grid and then use the values from the user defined control, then explain why the user defined control is not used in the 'New' data row

Thanks



MG Mohanraj Gunasekaran Syncfusion Team July 12, 2017 06:09 PM UTC

Hi Steve,  
 
Sorry for the inconvenience caused. 
 
We have created a new incident regarding your query and we have updated the response through the incident. So, please follow up with that incident using your direct-trac login. 
 

Regards, 
Mohanraj G 


Loader.
Live Chat Icon For mobile
Up arrow icon