|112530||Sep 26,2013 04:57 PM UTC||Oct 3,2013 06:44 AM UTC||ASP.NET MVC (Classic)||1|
Thanks for contacting Syncfusion support.
Your requirement of Generic DropDown with Databinding option can be achieved by setting the field of GenericDropDownField related to generic list and then assign the Datasource and bind the fields to GenericDropDownModel. Hence forth you can get the bind values in View page.
public ActionResult ToolsFeatures()
ViewData["DropdownData"] = new Student1DataContext().Student1;
GenericDropDownFields genericdropdownFields = new GenericDropDownFields()
Id = "UniversityCode",
Text = "Title"
GenericDropDownModel genericdropdownModel = new GenericDropDownModel()
DataSource =(System.Collections.IEnumerable)ViewData["DropdownData"], //Bindling Datasource with Generic list
BindTo = genericdropdownFields, //Binding Items with Generic DropDown fields
ClientSideOnClick = "ClientSideOnClick", //Binding ClientSideOnClick event
ViewData["myGenericDropDownModel"] = genericdropdownModel; //Binding dynamically created model to Viewdata
We have provided information about Generic DropDown with Data binding concept in our documentation. The documentation is available in following link.
We have also prepared a simple sample to explicit this behavior. It can be downloaded from below given link
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.