Datagridview
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Datagridview
Hi folks, newbie to both PS & primalforms. I have constructed a dataviewgrid that will be filled by windows credentials and require a user to submit their password for authentication purposes. I want to capture keystrokes to convert the characters to "*" (similar to using the textbox passwordchar = '*').I have 2 password columns; the first visible and editable to allow the user to enter their password and the second that is not visible that will hold the cleartext password to allow me to use to programmatically perform authentication (their account ID is in another column)To achieve this I am trying to bind a keypress event to the visible password using EditingControlShowing events and after much searching see there are a few considerations, especially in the area of reusing events on datagridview. I have found a C example (http://stackoverflow.com/questions/8659 ... agrid-view) but not familiar with C or the ability to change this equivalent PS code.The code in the example is not exactly what I want but if someone was able to show me the powershell equivalent then I can work with that. Alternatively if anyone has another powershell example of where they have bound keypress events to a datagridview cell then I could use this.Many thanks in advance.
Datagridview
Hi folks, newbie to both PS & primalforms. I have constructed a dataviewgrid that will be filled by windows credentials and require a user to submit their password for authentication purposes. I want to capture keystrokes to convert the characters to "*" (similar to using the textbox passwordchar = '*').I have 2 password columns; the first visible and editable to allow the user to enter their password and the second that is not visible that will hold the cleartext password to allow me to use to programmatically perform authentication (their account ID is in another column)To achieve this I am trying to bind a keypress event to the visible password using EditingControlShowing events and after much searching see there are a few considerations, especially in the area of reusing events on datagridview. I have found a C example (http://stackoverflow.com/questions/8659 ... agrid-view) but not familiar with C or the ability to change this equivalent PS code.The code in the example is not exactly what I want but if someone was able to show me the powershell equivalent then I can work with that. Alternatively if anyone has another powershell example of where they have bound keypress events to a datagridview cell then I could use this.Many thanks in advance.
Datagridview
Create a dialog.
Why would a user need ti login? A domain gives users a constant login. What is it you are doing thst needs numerous grid records of a user login. Datagridview is control for displaying data not a login form.
Create a dialog iwtrh a text control for user name and a textbox/password control for the password. Gather the info and move on.
Why would a user need ti login? A domain gives users a constant login. What is it you are doing thst needs numerous grid records of a user login. Datagridview is control for displaying data not a login form.
Create a dialog iwtrh a text control for user name and a textbox/password control for the password. Gather the info and move on.
Datagridview
Try the following on the DataGridView's CellFormatting event:$datagridview1_CellFormatting=[System.Windows.Forms.DataGridViewCellFormattingEventHandler]{#Event Argument: $_ =
[System.Windows.Forms.DataGridViewCellFormattingEventArgs] if ($_.ColumnIndex -eq 0 -and $_.Value -ne $null) { $_.Value = '*' * $_.Value.ToString().Length; }} You can either use the Column's index or name to determine if it should show the alternate characters. David
[System.Windows.Forms.DataGridViewCellFormattingEventArgs] if ($_.ColumnIndex -eq 0 -and $_.Value -ne $null) { $_.Value = '*' * $_.Value.ToString().Length; }} You can either use the Column's index or name to determine if it should show the alternate characters. David
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.