开发者

ExtJS RowEditor How to render all the component validation on load

Hi everyone i got the following issue, i have a GridPanel with a RowEditor Nevertheless it doesnt validate my fields when it renders 开发者_Python百科

ExtJS RowEditor How to render all the component validation on load

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

ExtJS RowEditor How to render all the component validation on load

Can you suggest me something? Thanks!!


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;
    }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜