Last post Oct 16, 2011 09:48 PM by Decker Dong - MSFT
Oct 15, 2011 12:21 PM|Silverlight.Shailendra|LINK
I am displaying Personal Details with Qualification in ListView. Once I click on
Edit Button it shows me correct information. I've table called Qualification where I stored all streams like BCA,MCA,MCS,BE etc... Can I display these qualification in DropDownList in ListView? Also I want to store it's ID in my
PersonalDetails table. Can anybody guide me?
Oct 16, 2011 09:48 PM|Decker Dong - MSFT|LINK
You should put your Dropdownlist inside the ListView in its EditTemplate, and then bind it with DataSource, DataTextField as well as DataValueField. And in the end, please set the SelectedValue (no intellisense there at all) to bind to the field of the datasource
bound to the ListView itself. Here's the sample:
DataSource="<%# BindDept() %>"
SelectedValue='<%# Bind("DeptID") %>'
DataTextField="DepartmentName" DataValueField="DeptID" runat="server">