ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: kiwon34 on March 22, 2018, 12:17:18 pm

Title: Password Editing Cell
Post by: kiwon34 on March 22, 2018, 12:17:18 pm
Hello ParamQuery,

  How do I make a cell editor in a grid like a password control? I want the data to be displayed like a password. And if possible, I would like only numbers to be input.

Thank you.
Title: Re: Password Editing Cell
Post by: paramvir on March 22, 2018, 05:21:48 pm
It can be made into password field by adding attr: "type='password'" to column.editor

Code: [Select]
  editor: { attr:"type='password'" }

Numbers can be enforced by adding dataType:'float' or dataType:'integer' to column.
Title: Re: Password Editing Cell
Post by: kiwon34 on March 23, 2018, 06:03:46 am
Thank you for the reply.

I can see that the cell is displayed as password while typing or focusing, but when it is focused out, the field is shown as plain text.  I want the cell to be displayed always as password type.
What option should I add more?
Title: Re: Password Editing Cell
Post by: paramvir on March 23, 2018, 10:59:23 am
column.render can be used for that.

Code: [Select]
render: function(ui){
return (ui.cellData+"").replace(/\d/g,"*");
}