Adding Dynamically Dropdown list to GridView


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Adding Dynamically Dropdown list to GridView

  1. #1
    Join Date
    Sep 2007
    Posts
    2

    Adding Dynamically Dropdown list to GridView

    I have grid view and I want to add Drop Down list to it on the first row of the grid. That drop down list will contain product names when I will select product name it will show initial value of that product in the grid and some other information.

    I have 2 tables
    1. Products
    ProdID
    ProdName
    ProdInvoicePrice(same as Initial Price)
    Trade Price
    Ctns
    PerCtnPrice
    Date

    2.ProductType
    ProdID
    ProdName
    InitalPrice
    Date

    Now dropdownlist will contain ProductType table and will contain only ProductName so when i select one productname and enter the details I want another dropdown list should be populated in another row.

    How can this be done? Please Help

  2. #2
    Join Date
    Aug 2007
    Location
    London
    Posts
    73
    For that Give OnitemDataBound ="Some Function name" for datagrid.

    and call that function in code behind.Inside that using findcontrol, get that required control (dropdownlist)
    and do the binding in this function.

Similar Threads

  1. Populating 2 Dropdown List control
    By Nelson in forum ASP.NET
    Replies: 2
    Last Post: 05-09-2014, 12:04 AM
  2. dropdown list
    By abenitez77 in forum VB Classic
    Replies: 2
    Last Post: 05-09-2014, 12:00 AM
  3. Adding checkbox and textbox to gridview
    By luvdairish in forum ASP.NET
    Replies: 0
    Last Post: 01-04-2007, 11:36 AM
  4. Replies: 1
    Last Post: 08-28-2002, 10:55 AM
  5. July 2001 Tip of the Month - Dynamically Create an Image List
    By Larry Rebich in forum vb.announcements
    Replies: 0
    Last Post: 07-04-2001, 03:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center