ExtJS RowEditor How to render all the component validation on load

1.4k views Asked by At

Hi everyone i got the following issue, i have a GridPanel with a RowEditor Nevertheless it doesnt validate my fields when it renders enter image description here

But if i focus all my fields to edit and refresh the grid its just appear as i would like them in the first place

enter image description here

Can you suggest me something? Thanks!!

1

There are 1 answers

0
Zango On BEST ANSWER

RowEditor uses Ext.form package components such as: "TextField" "DateField" "ComboBox" and so on... And validations are performed by them. Grid does't have such feature to validate. Validation feature may be achieved by renderer config option of column. For example, your Description column config might be looked like this:

{
    header    : 'Description',
    dataIndex : 'description',
    renderer  :function(description, metaData){
        if(!description){
            //if description is blank let background of it be red.
            medaData.style+="background-color:red;"; //or whatever css can be applied
        }
        return description;
    }
}