locked
dropdownlist in grideview RRS feed

  • Question

  • User-956724251 posted

    Hello friendzz,

     how can i use dropdownlist in gridview In this dropdownlist i get data from another table then grideview table data.any one suggest or give me code for this what to do me....???

    Wednesday, September 12, 2012 1:53 AM

Answers

All replies

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, September 12, 2012 2:09 AM
  • User-956724251 posted

    Thnx narasappa......:)

    Wednesday, September 12, 2012 2:21 AM
  • User-956724251 posted

    but i required data in dropedown list from another table data. 

    In my project i want to required data from "Roommaster" table for dropdownlist and for grideview i required data from "tabledata" table.In my project dropdownlist in grideview so what to do for this....???

    Wednesday, September 12, 2012 2:55 AM
  • User-489377026 posted

    Hi umang siddhapura,

    You can solve your issue by just change the table and dropdownlist's DataTextField DataValueField.

    ddlCountries.DataSource = GetData("SELECT DISTINCT Country FROM tabledata");
    
            ddlCountries.DataTextField = "new field";//new fied is in tabledata
    
            ddlCountries.DataValueField = "new fidld";//new fied is in tabledata

    Thanks
     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 18, 2012 5:00 AM