Click here to Skip to main content
Sign Up to vote bad
good
See more: C#ASP.NETMySQL
Dear All,
How to used obout grid inside dropdownlist.
Posted 26 Sep '12 - 20:32


3 solutions

DropDownList ddlSTANDINGFtr = (DropDownList)GridView1.FindControl("ddlSTANDINGFtr");
 

string com = "SELECT ID,SLNO FROM TBL WHERE CODE='" + ..... + "' AND STATUS= 0";
DataTable dt = Lib.FnFetchData(com);
ddlSTANDINGFtr.DataSource = dt;
ddlSTANDINGFtr.DataBind();
ddlSTANDINGFtr.DataTextField = "SLNO";
ddlSTANDINGFtr.DataValueField = "SLNO";
ddlSTANDINGFtr.DataBind();
ddlSTANDINGFtr.Items.Insert(0, new ListItem("--Select--", "0"));
  Permalink  
take a look at these articles. they would explain how to use dropdownlist in a gridview.
Use DropDownList in ASP.NET GridView Control
Using RadioButtonList and DropDownList in GridView Row
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 496
1 Mahesh Bailwal 342
2 Maciej Los 228
3 Aarti Meswania 215
4 Arun Vasu 174
0 Sergey Alexandrovich Kryukov 9,607
1 OriginalGriff 7,214
2 CPallini 3,943
3 Rohan Leuva 3,261
4 Maciej Los 2,758


Advertise | Privacy | Mobile
Web01 | 2.6.130516.1 | Last Updated 27 Sep 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid