Sir, I need your help to pass the value instead of id.
I am trying to pass barcode of a product. I have two product with barcode 100 and 101.
The event is selectedIndexChanged
here my code:-
dgvProduct.Rows[dgvProduct.Rows.Count - 1].Cells["dgvtxtBarcode"].Value= drdeliverynotedetails.ItemArray[1].ToString();
please reply with code to pass or fill value of the column.
Loading


Sunny SharmaRank #223 · 11.1K reputationPosted Oct 14, 2013, 10:51 AM EDT
So, are you sure this line of code getting the appropriate value back:
drdeliverynotedetails.ItemArray[1].ToString();
Since I'm not seeing your code on how are you fetching it from DB, I can not answer your question perfectly but I will suggest you to put a breakpoint and check if the cell is getting any value.
Share more code for better clarification on the subject.
Sunny SharmaRank #223 · 11.1K reputationPosted Oct 14, 2013, 4:03 AM EDT
not getting your point, what the problem is, can you please explain a little more?
Bineesh ViswanathRank #1,681 · 907 reputationPosted Oct 14, 2013, 9:56 AM EDT
id barcode
1 100
I this I'm getting the id instead of Barcode value. the grid columns are:-
SI.No Barcode Pr.Id Pr.Name Qtry Rate
1 ( our portion) 1 Product1 5 200
My gridview's name is dgvtxtBarcode. See the bracode portion is not filling with value.