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

MultiSelectionComboBox in GridGroupingControl.

Thread ID:

Created:

Updated:

Platform:

Replies:

145387 Jun 19,2019 06:41 PM UTC Jun 26,2019 01:44 PM UTC WinForms 9
loading
Tags: GridGroupingControl
Gregory Pe
Asked On June 19, 2019 06:41 PM UTC

Hi, 
How to bind data MultiSelectionComboBox in GridGroupingControl.






Jagadeesan Pichaimuthu [Syncfusion]
Replied On June 20, 2019 12:24 PM UTC

Hi Gregory, 
 
Thanks for using Syncfusion product. 
 
We could able to understand your scenario, but the GridGroupingControl does not have the direct support for multiSelectionComboBox. This can be achieved by creating CustomCellModel and CustomCellRenderer and adding the cusom CellModel to the grid. Please make use of below code and sample,  
 
//To add the custom cell model to the grid  
this.gridGroupingControl1.TableModel.CellModels.Add("CustomDropDownCell"newDropDownFormCellModel(this.gridGroupingControl1.TableModel, new DropDownForm()));  
  
public class DropDownFormCellModel : GridStaticCellModel  
 
               internal DropDownForm ddForm;  
  
               protected DropDownFormCellModel(SerializationInfo info, StreamingContextcontext)  
                              : base(info, context)  
               {  
               }  
  
               // sets ddForm and also reserves space for our button...  
               public DropDownFormCellModel(GridModel grid, DropDownForm ddForm)  
                              : base(grid)  
               {  
                              this.ddForm = ddForm;  
                              ButtonBarSize = new Size(14, 18);  
               }  
  
               //note that this method create our new derived renderer  
               public override GridCellRendererBase CreateRenderer(GridControlBase control)  
               {  
                              return new DropDownFormCellRenderer(control, this);  
               }  
/////////Some Code/////////////  
 
  
  
  
public class DropDownFormCellRendererGridStaticCellRenderer  
 
               internal DropDownForm ddForm;  
  
               public DropDownFormCellRenderer(GridControlBase grid, GridCellModelBasecellModel)  
                              : base(grid, cellModel)  
               {  
                              this.ddForm = ((DropDownFormCellModel)this.Model).ddForm;  
  
                              this.AddButton(new GridCellComboBoxButton(this));  
  
               }  
/////////////////Some Code/////////////  
 
 
 
 
 
We have marked the GridGroupingConrol as a classic control. So, we have stopped the development work for this control. If it is possible to upgrade our newly implemented SfDataGrid control which has more advanced features and it is more effective compare than GridGroupingControl and reported scenario is working fine in our SfDataGrid control. The SfDataGrid control provides support to adding the MultiSelectionComboBox, please refer the below UG link. 
 
 
Please refer the below link to find the difference between the GridGroupingControl and SfDataGrid.  
 
Please let us know if you have any hurdles to upgrade to our newly implemented SfDataGrid control. 
 
Regards, 
Jagadeesan 


Gregory Pe
Replied On June 21, 2019 09:01 AM UTC

Hi Jagadeesan ,

Thank you for your help
Regards, 
Gregory


Jagadeesan Pichaimuthu [Syncfusion]
Replied On June 21, 2019 09:52 AM UTC

Hi Gregory, 
 
Thanks for your update. 
 
We are glad to know that the provided solution worked at your end. Please let us know if you have any further queries on this. We are happy to help you. 
 
Regards, 
Jagadeesan 


Gregory Pe
Replied On June 22, 2019 05:09 AM UTC

Hi Gregory, 
 
Thanks for using Syncfusion product. 
 
We could able to understand your scenario, but the GridGroupingControl does not have the direct support for multiSelectionComboBox. This can be achieved by creating CustomCellModel and CustomCellRenderer and adding the cusom CellModel to the grid. Please make use of below code and sample,  
 
//To add the custom cell model to the grid  
this.gridGroupingControl1.TableModel.CellModels.Add("CustomDropDownCell"newDropDownFormCellModel(this.gridGroupingControl1.TableModel, new DropDownForm()));  
  
public class DropDownFormCellModel : GridStaticCellModel  
 
               internal DropDownForm ddForm;  
  
               protected DropDownFormCellModel(SerializationInfo info, StreamingContextcontext)  
                              : base(info, context)  
               {  
               }  
  
               // sets ddForm and also reserves space for our button...  
               public DropDownFormCellModel(GridModel grid, DropDownForm ddForm)  
                              : base(grid)  
               {  
                              this.ddForm = ddForm;  
                              ButtonBarSize = new Size(14, 18);  
               }  
  
               //note that this method create our new derived renderer  
               public override GridCellRendererBase CreateRenderer(GridControlBase control)  
               {  
                              return new DropDownFormCellRenderer(control, this);  
               }  
/////////Some Code/////////////  
 
  
  
  
public class DropDownFormCellRendererGridStaticCellRenderer  
 
               internal DropDownForm ddForm;  
  
               public DropDownFormCellRenderer(GridControlBase grid, GridCellModelBasecellModel)  
                              : base(grid, cellModel)  
               {  
                              this.ddForm = ((DropDownFormCellModel)this.Model).ddForm;  
  
                              this.AddButton(new GridCellComboBoxButton(this));  
  
               }  
/////////////////Some Code/////////////  
 
 
 
 
 
We have marked the GridGroupingConrol as a classic control. So, we have stopped the development work for this control. If it is possible to upgrade our newly implemented SfDataGrid control which has more advanced features and it is more effective compare than GridGroupingControl and reported scenario is working fine in our SfDataGrid control. The SfDataGrid control provides support to adding the MultiSelectionComboBox, please refer the below UG link. 
 
 
Please refer the below link to find the difference between the GridGroupingControl and SfDataGrid.  
 
Please let us know if you have any hurdles to upgrade to our newly implemented SfDataGrid control. 
 
Regards, 
Jagadeesan 


Hi Jagadeesan
how to call DropDown Form. as ChildForm.MdiParent  in Form1

Regards,
Gregory

Attachment: MultiSelectionComboBox_GGC556014775_ac48d81a.rar

Jagadeesan Pichaimuthu [Syncfusion]
Replied On June 24, 2019 01:50 PM UTC

Hi Gregory, 
 
Thanks for your update. 
 
We have checked your requirement to set the DropDown form as the MDI form of the Form1. You can achieve your requirement by using the below code snippet, 
 
private void form2ToolStripMenuItem_Click(object sender, EventArgs e) 
{ 
    DropDownForm ChildForm = new DropDownForm(); 
    ChildForm.MdiParent = this; 
    ChildForm.Show(); 
} 
 
If we misunderstood your requirement, please provide more information regarding the requirement. This would help us to proceed further. 
 
Regards, 
Jagadeesan 


Gregory Pe
Replied On June 24, 2019 04:27 PM UTC

Hi Gregory, 
 
Thanks for your update. 
 
We have checked your requirement to set the DropDown form as the MDI form of the Form1. You can achieve your requirement by using the below code snippet, 
 
private void form2ToolStripMenuItem_Click(object sender, EventArgs e) 
{ 
    DropDownForm ChildForm = new DropDownForm(); 
    ChildForm.MdiParent = this; 
    ChildForm.Show(); 
} 
 
If we misunderstood your requirement, please provide more information regarding the requirement. This would help us to proceed further. 
 
Regards, 
Jagadeesan 


Hi Jagadeesan

but I meant calling from the level  gridGroupingControl1

 this.gridGroupingControl1.TableModel.CellModels.Add("CustomDropDownCell", new DropDownFormCellModel(this.gridGroupingControl1.TableModel, new DropDownForm()));

currently working but not  MdiParent  in Form1

Regards,
Gregory


Jagadeesan Pichaimuthu [Syncfusion]
Replied On June 25, 2019 10:58 AM UTC

Hi Gregory, 
 
Thanks for your update. 
 
We have checked your query in our end, but when you set the CellType as CustomDropDownCell then the DropDownForm will load only in cell and you could not able to load it as MDI parent. Please refer the below screen shot for your reference, 
 
 
 
If we misunderstood your requirement, please provide more information regarding the requirement. This would help us to proceed further. 
 
Regards, 
Jagadeesan

Gregory Pe
Replied On June 25, 2019 04:17 PM UTC

Hi Gregory, 
 
Thanks for your update. 
 
We have checked your query in our end, but when you set the CellType as CustomDropDownCell then the DropDownForm will load only in cell and you could not able to load it as MDI parent. Please refer the below screen shot for your reference, 
 
 
 
If we misunderstood your requirement, please provide more information regarding the requirement. This would help us to proceed further. 
 
Regards, 
Jagadeesan


Hi

it is not mdi

Jagadeesan Pichaimuthu [Syncfusion]
Replied On June 26, 2019 01:44 PM UTC

Hi Gregory, 
 
Thanks for your update. 
 
When you set the CellType as CustomDropDownCell then the DropDownForm will load only when click on the particular cell dropdown button and you can able to show only inside the GridGroupingControl alone and not able to show the DropDownForm as MDI. We have checked your query in our end, but we could not understand your exact requirement clearly. So can you please provide your exact requirement, this will be more helpful to provide the solution at earliest. 
 
Regards, 
Jagadeesan 


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.

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