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

How to disable grid validations when editing using Dialog/Inline template

Hello,

How can I disable all grid validations when using Dialog/Inline custom template? 

Using the Angular's version of the Grid, it is done by:

public actionComplete(args: any): void {
      if ((args.requestType === 'beginEdit' || args.requestType === 'add')) {
            let dialog = args.dialog;
          // change the header of the dialog
          dialog.header = args.requestType === 'beginEdit' ? 'Record of ' + args.rowData['ID'] : 'New Record';
          args.form.ej2_instances[0].rules = {};
          args.form.ej2_instances[0].allowSubmit = true;
        }
  }

Can I modify the header of the dialog, similar as is done using Angular?

Thanks,

Bill

3 Replies

VN Vignesh Natarajan Syncfusion Team November 8, 2019 12:25 PM UTC

Hi Bill,  

Greetings from Syncfusion support.  

Query: “How can I disable all grid validations when using Dialog/Inline custom template?  
 
We understand that you want to disable all the Grid validation. Validation rules will be enabled in Grid only when we define the ValidationRules in GridColumn. So if you do not want to display validation. Kindly ignore that property (ValidationRules) from GridColumn. If not kindly share more details about your requirement.   

Query: “Can I modify the header of the dialog, similar as is done using Angular? 

Yes, we can customize the Dialog header by defining the Dialog property of GridEditSettings which gives you the dialog instance. Using dialog instance, you can define your own customized header using header property. Refer the below code example   

<EjsGrid DataSource="@Orders" AllowPaging="true" Toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Update", "Cancel" })" Height="315"> 
    <GridEditSettings AllowAdding="true" AllowEditing="true" Dialog="DiaogParams" AllowDeleting="true" Mode="EditMode.Dialog"></GridEditSettings> 
         .  
</EjsGrid> 
 
@code{ 
    public List<Order> Orders { get; set; } 
     public object DiaogParams = new 
    { 
       @@params = new DialogModel { Header = "Customized Header" } 
    };.           .                 .  
} 

Refer the below screenshot for your reference 

 

Please get back to us if you have further queries.   

Regards, 
Vignesh Natarajan. 



DT Dimitrios Tsarouchis November 8, 2019 12:29 PM UTC

Thanks  a lot,

Regards,

Bill


VN Vignesh Natarajan Syncfusion Team November 11, 2019 05:36 AM UTC

Hi Bill,  

Thanks for the update.  

We are glad to hear that you are able to achieve your requirement using our solution.  

Please get back to us if you have further queries.  

Regards, 
Vignesh Natarajan. 


Loader.
Live Chat Icon For mobile
Up arrow icon