SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Mar 2005
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Gridview Editable (Client Side)

    How to achive this in GridView?

    I need to edit one row at a time with a single Update button. Clicking on an Edit (gif) (adjacent to each row), the row should become editable.

    After editing, when I click on the Update button, it should be updated. (This can be easily done)

    The rows which are becoming editable should happen on the client side. I just want to know how to achieve this on the client side.

    I cannot use any AJAX Controls (UpdatePanel etc)

    Pls help.

  2. #2
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,629
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    First, don't use a grid view.

    Use a repeater to push the data out, then use some custom scripting--preferably backed by JQuery or some other sane scripting library to convert the row from data to form fields. Then grab the fields and post them back as XML or JSON depending on your pain tolerance.

  3. #3
    SitePoint Zealot
    Join Date
    Mar 2005
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For some reason, I have to Use GridView.

    Clicking on the Edit link (adjacent) to each row, the row should become editable. Basically, Label should change to DropDown. So, I have to play with visibility and invisibility of each control on each row of the grid.

    So, Can't I use javascript to play with visibility and invisibility?

  4. #4
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,629
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Why do you have to use a grid view?

    Anyhow, yes, you could use javascript to do that with a grid view, but they are so much more complex with so much more going on that, if you are going to essentially power this off custom javascript, you are better off using lighter-weight controls that leave you more in control of the output. In any case, using the native edit functionality of the grid view will be much more painful using custom scripting vs. just writing custom script against a plain old table.


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
  •