Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 18, 2012 08:16 AM by Qin Dian Tang - MSFT
Apr 16, 2012 12:35 AM|LINK
I have read somebody posted this on other forum...But the answer is kind of vague.
So I am just wondering if somebody could really tell me or explain what it is?
I have also done some google search and cannot find a better answer.
Apr 16, 2012 01:47 AM|LINK
below link might be help you better....
Apr 16, 2012 06:19 AM|LINK
When you bind any database element to your aspx/design page, you use this property. There's something called as Databinder.Eval for which someone gets confused with Container.DataItem.
Container.DataItem gets the current row of that collection. It is a runtime alias for the DataItem for this specific collection item.
This link would be helpful for you to have a glance on it.
Apr 16, 2012 10:41 PM|LINK
I have read this already. But I am not really sure what it means by DataItem. Is DataItem a specific piece of data retrieved from a database?
DataBinder.Eval(Container.DataItem, "Price"). Does it mean that the computer looks through the database and find the specific row and get the piece of data from the Price field or Price column within that row?
So what about this
Apr 18, 2012 08:16 AM|LINK
This is the binding syntax code. The DataItem means getting data from the datasource of the binding control such as GridView or ListView. Then give a name for the dataitem to specify which field you want to get here from the whole datasource.