Loading
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 attend5days leftRegister
ShankeyRank #972 · 2.1K reputationPosted Mar 7, 2011, 11:54 PM EST
Vijay YadavRank #1,637 · 943 reputationPosted Mar 8, 2011, 12:08 AM EST
Read this as well..
Data Binding is binding controls to data from databases. With data binding we can bind a control to a particular column in a table from the database or we can bind the whole table to the data grid. Data binding provides simple, convenient, and powerful way to create a read/write link between the controls on a form and the data in their application.
Amit ChoudharyRank #145 · 15.8K reputationPosted Mar 8, 2011, 5:25 AM EST
and the binding in asp.net is done by assigning any collection that implements IEnumerator or IEnumerable interface. so its not necessary you need datatable everytime you can use ArrayList, List or any object.
After setting the datasource property we need to call the DataBind() method.
for e.g.,
Gridview1.DataSource = DataTable1;
GridView.DataBind();
After calling the DataBind() method a series of events executed to create the structure of GridView according to the DataSource.
These events are: RowDataBound, RowCreated etc.
Hope this short explanation will help you.
Thanks.
Please mark as answer if it helps you.
Suthish NairRank #92 · 22.8K reputationPosted Mar 10, 2011, 5:12 AM EST