C#
How to get value of single row in data gridview from database in three tier for windows application?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Jan 9, 2014, 10:38 PM EST
Couldn't you access your Db tier or ?
Angel Princess100 reputationPosted Jan 10, 2014, 12:34 AM EST
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Jan 10, 2014, 1:08 AM EST
Nice example for your question.
Angel Princess100 reputationPosted Jan 10, 2014, 1:10 AM EST
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Jan 10, 2014, 3:19 AM EST
select* from thattable where thatid =this
or
select top 1 from thattable
SUNIL GUTTARank #1,832 · 810 reputationPosted Jan 13, 2014, 4:54 AM EST
In addition to above post .
Well you are specifying single row right ..
1) SELECT * FROM TABLEA WHERE ROW_PK_ID = 10 ;
2) LATER using ADO.net command or adapter class store in data reader or dataset respectively according to your comfort .
3) Datareader dr= commandobject.executereader();
Now add datasurce to GV as datareader (contains a row of table )
4) gridiew1.datasource = dr[0];
I hope you are clear
---Mark it best answer if you feel it as best LoL---