Click here to Skip to main content
15,900,714 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

How to get one column values using dataset?

I want 1st and 2nd cell values of second column values.
Posted
Updated 6-Jan-11 0:56am
v5
Comments
Rajesh Anuhya 6-Jan-11 6:47am    
No Effort...
Dalek Dave 6-Jan-11 6:51am    
Minor edit for Grammar.
Venkatesh Mookkan 6-Jan-11 6:56am    
Typo correction in the heading
Hiren solanki 7-Jan-11 0:24am    
you can accept answer for not getting more answer as you've found the answer what you need.

1 solution

ds.tables[0].Rows[0]["ColumnName"].ToString();//This will give you requested cell value of row 0


Make sure that you've understanding of DataSet itself doesn't contain any column, It contains table and further table contains column.
 
Share this answer
 
v3
Comments
Dalek Dave 6-Jan-11 6:51am    
Good Answer.
JF2015 6-Jan-11 6:56am    
Good - Have my 5!
Rajesh Anuhya 6-Jan-11 6:56am    
Good Answer +5
Venkatesh Mookkan 6-Jan-11 6:58am    
Seriously, I don't understand the question Hiren. ;)

I wonder, how you managed to answer it. I feel like you answer him partially.
Hiren solanki 6-Jan-11 7:02am    
See venkatesh I've tried to explain it in detail.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900