Results 1 to 2 of 2

Thread: drop down in datagrid

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2002
    Location
    London
    Posts
    678

    drop down in datagrid

    Hi,
    There is a drop down box in a web datagrid.
    This drop down is populated by using datatextfield and datavaluefied.
    Iin the edit mode of the grid I change the item in the drop down.
    How can I get the NEW integer value of the drop down?
    This is required for the update.

    Thanks

  2. #2
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877

    Re: drop down in datagrid

    Lets assume your drop down is named "cmbMake", here is how you can get the selected value.

    Code:
    DropDownList cmb = new DropDownList();
    int MakeID;
    
    cmb = (DropDownList)e.Item.FindControl("cmbMake");
    MakeID = Convert.ToInt32(cmb.Items[cmb.SelectedIndex].Value);
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width