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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
SUNIL GUTTAPosted Jan 13, 2014, 9:54 AM
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---
Jaganathan BantheswaranPosted Jan 10, 2014, 8:19 AM
select* from thattable where thatid =this
or
select top 1 from thattable
Angel PrincessPosted Jan 10, 2014, 6:10 AM
Jaganathan BantheswaranPosted Jan 10, 2014, 6:08 AM
Nice example for your question.
Angel PrincessPosted Jan 10, 2014, 5:34 AM
Jaganathan BantheswaranPosted Jan 10, 2014, 3:38 AM
Couldn't you access your Db tier or ?