Jump to content

DBGrid questions: resize, editing password, etc.


warmbooter

Recommended Posts

Hello!

 

1) My DBGrid is connected to a Users table containing a password field. What do I need to do to avoid the plain password text from being displayed in the grid, and when user edit it, a * to be displayed instead of the true character (like when using password char in an edit)?

 

2) If I have a DBGrid in a frame, and this frame parent is a containerpanel in the mainform, how can I make the DBGrid to automatically adjust its width and height when the browser window is resized?

 

3) How can I define a editmask for some of the fields, to forced the content to respect a specific format?

 

Thanks,

Carlos

Link to comment
Share on other sites

1) My DBGrid is connected to a Users table containing a password field. What do I need to do to avoid the plain password text from being displayed in the grid, and when user edit it, a * to be displayed instead of the true character (like when using password char in an edit)?

 

Hi Carlos,

 

First try analyze this demo example:

...\FMSoft\Framework\uniGUI\Demos\Desktop\GridEditors

   here, for example you can:  

UniEdit1.PasswordChar -> *

in this case the editor for your "2 nd column" will be like passwordfield

 

 

And for now, for rendering a password field, you can like this:

 

UniDBGrid1 -> ClientEvents -> ExtEvents add reconfigure fn:

function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts)
{
  columns[1].renderer = function(v) {
    return "*********"
  }
}

Best regards.

Link to comment
Share on other sites

Thank you! It worked.

 

Maybe you can help with this too:

 

I set up a UniComboBox as the editor of my State field. Is there a way to accept entering the value by the keyboard? Right now, if the focus is in the combo and I type any key, nothing happens. I need to click to see the dropdown list and select the state with the mouse. I was expecting kind of autodropdown if I start typing some key.

 

Any hint about the grid auto-resizing with the browser window?

 

Thanks again!

 

Carlos

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...