EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Fabrice on August 29, 2014, 09:34:55 AM



Title: Password field in Propertygrid
Post by: Fabrice on August 29, 2014, 09:34:55 AM
how can i do to have a password field in propertygrid, i can create a new extend editor with type='password' but when i validate row, text appears clearly in propertygrid cell, i suppose it's possible with formatter but formatter is for entire column, not for one row?


Title: Re: Password field in Propertygrid
Post by: stworthy on August 30, 2014, 05:02:51 AM
Although the 'formatter' function is applied to entire column, but you can constrain it in some specific rows.
Code:
formatter:function(value,row){
if (somecondition){
return '***';
} else {
return value;
}
}


Title: Re: Password field in Propertygrid
Post by: Fabrice on August 30, 2014, 08:49:45 AM
I have added a formatter to value column of my propertygrid and check id editor.type='password' in my formatter function, then i return '***', it's work fine.

Thank's a lot