SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Location
    England
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Datagrid - displaying specific columns as a dropdown

    Hi I need some help. I have a datagrid which displays a list of user data, such as name, his or her status, age.

    I have created a list of rows of user data but where the column shows status for example Single, Married, i want it to create a dropdown list where i can easily change the user status by selecting it from a dropdown and clicking the update button at the top of the datagrid.

    The update button will update all records that have been changed not just from the dropdown.

    I assume the dropdownlist requires a columnbinding event but i can't find any straight forward tutorials.

    thanks
    Read my blog...
    Skylight Studios

  2. #2
    SitePoint Guru pinch's Avatar
    Join Date
    Mar 2005
    Posts
    688
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by tdsmithj View Post
    Hi I need some help. I have a datagrid which displays a list of user data, such as name, his or her status, age.

    I have created a list of rows of user data but where the column shows status for example Single, Married, i want it to create a dropdown list where i can easily change the user status by selecting it from a dropdown and clicking the update button at the top of the datagrid.

    The update button will update all records that have been changed not just from the dropdown.

    I assume the dropdownlist requires a columnbinding event but i can't find any straight forward tutorials.

    thanks
    First off I'd use the gridview instead of the datagrid. Second, when updating the records in a grid you generally update a row at a time. The <EditItemTemplate> generally holds the controls needed to make modifications and will be automatically unlocked when you issue an edit command.

    The solution can be quite involved and I'd suggest you work through an entire tutorial to get an idea of the events you'll need to intercept, then you can adapt it to your requirements. This one would be a good start.


Bookmarks

Posting Permissions

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