Pergunta

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!!

Foi útil?

Solução

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;
    }
}
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top