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

MultiSelectionComboBox in GridGroupingControl.

Hi, 
How to bind data MultiSelectionComboBox in GridGroupingControl.






9 Replies

JP Jagadeesan Pichaimuthu Syncfusion Team 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 



GP Gregory Pe June 21, 2019 09:01 AM UTC

Hi Jagadeesan ,

Thank you for your help
Regards, 
Gregory



JP Jagadeesan Pichaimuthu Syncfusion Team 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 



GP Gregory Pe replied to Jagadeesan Pichaimuthu 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


JP Jagadeesan Pichaimuthu Syncfusion Team 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 



GP Gregory Pe replied to Jagadeesan Pichaimuthu 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



JP Jagadeesan Pichaimuthu Syncfusion Team 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


GP Gregory Pe replied to Jagadeesan Pichaimuthu 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


JP Jagadeesan Pichaimuthu Syncfusion Team 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 


Loader.
Live Chat Icon For mobile
Up arrow icon