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

Update of GridModel in GridControl


I have a grid with a row containing columns with covered cells (3 per column). So I wanted to write a custom copy paste for the same. Now the problem which I am facing is that my grid has a base class as UiBaseGrid where GridControl is getting created by passing a object of the class UiGridModel derived from GridModel. In the UiGridModel clipboardCopy and clipboardPaste functions are overridden and thus evertime I do Copy/Paste operation on my grid the control goes there.

Now in my class I wanted to override that grid model set in the GridControl with my own GridModel class. Can anyone please tell me if it is possible to do so. 


1 Reply

SP Subburaj Pandian Veluchamy Syncfusion Team June 28, 2019 12:46 PM UTC

Hi WillieBoykin, 
Thank you for contacting Syncfusion support. 
We have analyzed the mentioned scenario and suspect that base grid model is not initialized with the your UiGridModel is while initializing your custom UiGridControl. In order to update the grid model, we suggest you to initialize the base while the grid is initialized.  
Please refer to the below code, 
public class CustomGridControl : GridControl 
    public CustomGridControl(CustomGridModel model) 
        base(model// To override base grid model with the customized grid model. 
public class CustomGridModel : GridModel 
    public CustomGridModel () 
If still the issue exists, please provide us with simple sample with your customization. 
Subburaj Pandian V     

Live Chat Icon For mobile
Up arrow icon