Alternative of "databind()" in the windows form application
what is the alternative of databind() in windows form based 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.
VulpesPosted Jun 6, 2013, 7:21 PM
If you want to do more than simply binding to a control which has a DataSource property (such as a ComboBox, ListBox or DataGridView) then I'd check out this MSDN link:
http://msdn.microsoft.com/en-us/library/ef2xyb33.aspx
Sunny SharmaPosted Jun 6, 2013, 12:46 PM
You just have to assign it's DataSource property which accepts a DataTable object.
You must be aware of the syntax from my previous answers towards your questions, it's like:
DataGridView1.DataSource= DataTable1;
Now, if DataTable1 has records, DataGridView1 will bind it automatically, no DataBind() is neither available nor required.
Hope I answered your question.
Happy Coding :)
Mark this as answer if it helps!
Thanks.