I am new to windows desktop application development.
I have a grid in which I am displaying list of customers whose bills are printed.
The form looks like this.
The grid in this form displays the list of all customers and it is bounded in the Form_Load()
my code is :
private void SearchForm_Load(object sender, EventArgs e)
{
cn = db.createConnection();
if (cn.State == System.Data.ConnectionState.Open)
cn.Close();
cn.Open();
cmd = new OleDbCommand("Select BillNo,PartyName,Address,City,State,BillDt from BillMaster", cn);
da = new OleDbDataAdapter(cmd);
ds = new DataSet();
da.Fill(ds);
cn.Close();
dataGridView1.DataSource = ds.Tables[0];
ds.Dispose();
}
But the width of the PartyName
field is too short to read the full name. I want to customize the size of the all fields. How to do so?
Please help.