Hi,
Try this. I am making the first column a password column
Public Class Form1
Dim bs As New BindingSource
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim strConn As String = _
"Server = .;Database = NorthWind;" & _
"Integrated Security = SSPI;"
Dim conn As New SqlClient.SqlConnection(strConn)
Dim dt1 As New DataTable
Dim da1 As New SqlClient.SqlDataAdapter _
("Select * from Orders", conn)
da1.Fill(dt1)
bs.DataSource = dt1
DataGridView1.DataSource = bs
BindingNavigator1.BindingSource = bs
End Sub
Private Sub DataGridView1_CellFormatting(ByVal sender As Object, ByVal e
As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles
DataGridView1.CellFormatting
If e.ColumnIndex = 0 Then
e.Value = New String("*", e.Value.ToString.Length)
End If
End Sub
Private Sub DataGridView1_EditingControlShowing(ByVal sender As Object,
ByVal e As System.Windows.Forms.DataGridViewEditingControlShowingEventArgs)
Handles DataGridView1.EditingControlShowing
If DataGridView1.CurrentCell.ColumnIndex = 0 Then
DirectCast(e.Control, TextBox).PasswordChar = "*"
End If
End Sub
End Class
Ken
--------------------
[quoted text, click to view] "Massimo" <programmazioneINVALID@novasystem-srl.com> wrote in message
news:uOzG9jLsGHA.4664@TK2MSFTNGP03.phx.gbl...
> Is it possible to set the passwordchar property to a column or a cell of a
> datagridview to view the * characters when user digits?
>
> Thanks, Max
>