PRAISE PHS
Well-known member
- Joined
- Jun 2, 2011
- Messages
- 58
- Programming Experience
- Beginner
Hi all,
Pls, this my question is a simple thing for me, but I don't just know why I'm having issues with it.
The question is :
I am trying to display some items on data grid view from my data base. But whenever I display these datas, the first row of the grid view shows me the datas, while the next and other rows are blank. But if I select the row header of any row, the datas are shown while also highlighting them.
Pls, note that the grid view is not bound to the DB. I only made sure that the data property names of each columns on my grid have same name as the columns they represent on my DB. Below are my code:
Pls, this my question is a simple thing for me, but I don't just know why I'm having issues with it.
The question is :
I am trying to display some items on data grid view from my data base. But whenever I display these datas, the first row of the grid view shows me the datas, while the next and other rows are blank. But if I select the row header of any row, the datas are shown while also highlighting them.
Pls, note that the grid view is not bound to the DB. I only made sure that the data property names of each columns on my grid have same name as the columns they represent on my DB. Below are my code:
VB.NET:
Private Sub cboItemName_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboItemName.SelectedIndexChanged
st = Split(cboItemName.Text, "-")
arst = st(1)
adapter = New sqldataadapter("SELECT Stock.StockDate, Stock.Qty, Stock.StockOut, Stock.BalanceStock, Stock.UnitPrice FROM Stock, Products WHERE Product.ItemID = Stock.ItemID AND Product.ItemID = " & interger.parse(arst), MyConn)
ds = New DataSet
Adapter.Fill(ds, "Stock")
dgvStockDetails.DataSource = ds
dgvStockDetails.DataMember = "Stock"
Last edited: