Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
01) I have DataSet Call tempDataSet
02) This tempDataSet Has One DataTable Call tempStock And it has two columns(ItemCode,
Description,Qty)this DataTable Has Bind To Datagridview

what i want to do is I want to fill datagride view using sql select statement like this

(select ItemCode,Description,Qty From Stock)

how to do This
thanks
Posted
Comments
Thanks7872 23-Dec-14 7:25am    
First you mentioned that you have binded to Datagridview and now you are asking fill datagride view. What is the difference here? Question is not clear.
DamithSL 23-Dec-14 7:35am    
are you creating dataset dynamically? if you need to run sql select statement you need database. what is your database or database server?

1 solution

Follow this instruction: DataGridView.DataSource Property[^]. On the bottom of page, you'll find a code.
 
Share this answer
 
Comments
Maciej Los 23-Dec-14 11:51am    
Thank you, downvoter! I'd like to know the reason of downvote to be able to discuss about that and eventually to improve my answer. Give me a chance!

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