Alternative of "databind()" in the windows form application
what is the alternative of databind() in windows form based application?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
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 attend4days leftRegister
Sunny SharmaRank #223 · 11.1K reputationPosted Jun 6, 2013, 8:46 AM EDT
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.
VulpesRank #55 · 29.2K reputationPosted Jun 6, 2013, 3:21 PM EDT
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