Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

PasswordChar at a DataGridView C#

$
0
0

So, I have a DataGridView that shows an USER, but I don't want to show his password, but I need that the Row has the password saved in his value, because when I click at the Row I will create a instance of a USER with the information of the Row clicked and pass to another form.

How could I do that?

That is the code that fill the dataGridView.

UserCollection userCollection = userController.SearchAllUsers();

foreach( User user in userCollection )
{

dataGridViewUser.Rows.Add();

dataGridViewUser.Rows[row].Cells[0].Value = user.idUser;
dataGridViewUser.Rows[row].Cells[1].Value = user.nameUser;
dataGridViewUser.Rows[row].Cells[2].Value = user.loginUser;
dataGridViewUser.Rows[row].Cells[3].Value = user.passwordUser; //DON'T SHOW IT.

row++;

}

Sorry, English is not my first language.


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>