I am creating windows application using c#.net 2010, here I am using grid view, inside my grid view I am set combo box in page load option, I am run the application binding all database data’s are shown in combo box, but I want only particular data’s only binding for combobox how to create. Ex: Product nu prices 40 1000(combobox here binding (40 number values only) 1000, 900 how to bind ) 50 1500(combobox) 40 900(combobox) Give me any one idea
DropDownList ddlProducts = ???; // How you create the drop down list is up to you ddlProducts.DataSource = GetData("SELECT ProductNo, Price FROM Products"); ddlProducts.DataTextField = "Price"; // This will be shown in the text field ddlProducts.DataValueField = "ProductNo"; // This can be used for other queries ddlProducts.DataBind();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)