I am new in windows application development.
I want to bind the data in gridview's DataGridViewTextBoxColumn
private void Form1_Load(object sender, EventArgs e)
cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\\Bill\\dbBill.accdb");
string query = "Select Sr,Desc,HSNCode,Qty,Rate,Qty*Rate as Amount from BillDetail";
cmd = new OleDbCommand(query, cn);
da = new OleDbDataAdapter(cmd);
ds = new DataSet();
grdDetails.DataSource = ds;
I have set the property DataPropertyName also but still not getting the record.
Please help me.
Thanks in advance
---I think this is helpful for you
---Gridview DataPropertyName should same as field name that given in Quary
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)