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

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

Thread ID:

Created:

Updated:

Platform:

Replies:

148904 Nov 7,2019 03:18 PM UTC Nov 11,2019 05:36 AM UTC Blazor 3
loading
Tags: Grid
Bill Lemonis
Asked On November 7, 2019 03:18 PM UTC

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

Vignesh Natarajan [Syncfusion]
Replied On 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. 


Dimitrios Tsarouchis
Replied On November 8, 2019 12:29 PM UTC

Thanks  a lot,

Regards,

Bill

Vignesh Natarajan [Syncfusion]
Replied On 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. 


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