0

I'm new to this and I hope you get me, As you can see in the picture, the rows inside the column password have mask, my question is how can I copy that design inside my datagridview?

Click here to see my database

This is my code on how I retrieve does data and inserted it into my datagrid view.

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using System.Data.OleDb;

    namespace GoldenToolsThesisProject
    {
        public partial class FrmSetup : Form
        {
            OleDbConnection connection = new OleDbConnection();
            OleDbCommand command = new OleDbCommand();
        }
        private void FrmSetup_Load(object sender, EventArgs e)
        {
    connection.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=Database1.accdb;
                                    Persist Security Info = True";
DisplayData();
        }
        private void DisplayData()
        {
            try
            {
                connection.Open();
                command.Connection = connection;
                command.CommandText = "SELECT * FROM People";

                OleDbDataAdapter Adptr = new OleDbDataAdapter(command);
                DataSet Table = new DataSet();
                Adptr.Fill(Table);
                DataGridView1.DataSource = "";
                DataGridView1.DataSource = Table.Tables[0];
            }
            catch (Exception e)
            {
                MessageBox.Show("Error: " + e.Message);
            }
            connection.Close();
        }
    }

Here's my DataGridView1 output:

I want to get the design in column password into my datagridview so it can't be visible when opened. I hope someone could help me with this. This keeps me up for days and I don't know the answer.

Thank you guys in advance!

0 Answers0