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 configure custom text for editable column

Thread ID:

Created:

Updated:

Platform:

Replies:

145555 Jun 27,2019 07:46 PM UTC Jun 28,2019 12:42 PM UTC Angular - EJ 2 1
loading
Tags: Grid
Adriano Nascimento
Asked On June 27, 2019 07:46 PM UTC

Hello,

how can I define a custom text for a required field in a grid column edited inline.
I use validationRules but I do not know which property to use for the text.

Thavasianand Sankaranarayanan [Syncfusion]
Replied On June 28, 2019 12:42 PM UTC

Hi Adriano, 

Greetings from Syncfusion support. 

We can achieve your requirement using the below code example. 

[app.component.html] 

<ejs-grid #normalgrid id='Normalgrid' [dataSource]='data' allowPaging='true' [pageSettings]='pageSettings' [editSettings]='editSettings' [toolbar]='toolbar' (actionBegin)='actionBegin($event)'> 
            <e-columns> 
                <e-column field='OrderID' headerText='Order ID' width='140' textAlign='Right' isPrimaryKey='true' [validationRules]='orderidrules'></e-column> 
                 
                  --------------- 

            </e-columns> 
        </ejs-grid> 

--------------------------------------------------------------------------------------------------------------------- 
[app.component.ts] 

export class AppComponent { 
    @ViewChild('ddsample') 
    public dropDown: DropDownListComponent; 
    public data: Object[]; 
    public editSettings: Object; 
    public toolbar: string[]; 
    public orderidrules: Object; 

     ---- 

    public ngOnInit(): void { 
        this.data = orderDataSource; 
        this.editSettings = { allowEditing: true, allowAdding: true, allowDeleting: true , newRowPosition: 'Top' }; 
        this.toolbar = ['Add', 'Edit', 'Delete', 'Update', 'Cancel']; 
        this.orderidrules = { required: [true,'OrderID is required'], number: true }; 
         
        ----- 

   


We have prepared a simple sample in the following link. 


Regards, 
Thavasianand S. 


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