Gridview doubleclick to select the row

Discussion in 'ASP .Net' started by RS, Apr 14, 2006.

  1. RS

    RS Guest

    Hi guys
    I want the user to double click on the rows in the gridview to select
    them. How can I do that? Currently I have a Select button way at the
    end of each row, but usability wise its not very good, user always have
    to srcoll to the see the select button. I think double clicking the row
    would make their lives easier. Anybody has any idea on how to do this?
    Thanks
    RS, Apr 14, 2006
    #1
    1. Advertising

  2. RS

    Jan Hyde Guest

    "RS" <>'s wild thoughts were released on
    14 Apr 2006 11:32:59 -0700 bearing the following fruit:

    >Hi guys
    > I want the user to double click on the rows in the gridview to select
    >them. How can I do that? Currently I have a Select button way at the
    >end of each row, but usability wise its not very good, user always have
    >to srcoll to the see the select button. I think double clicking the row
    >would make their lives easier. Anybody has any idea on how to do this?
    >Thanks


    couldn't you just put the select button on the start of the
    row?



    Jan Hyde (VB MVP)

    --
    For insomnia move to the edge of the bed and you'll soon drop off.
    (Pun of the Day)
    Jan Hyde, Apr 18, 2006
    #2
    1. Advertising

  3. RS

    RS Guest

    I could, but still from the user's point, its easier and faster to
    click on the row, rather than scrolling back and forth for the button.
    RS, Apr 18, 2006
    #3
  4. RS

    jd Guest

    I'm a newbie with the same issue. I think that there's a usability
    problem even when scrolling isn't necessary: why should there be a
    "select button" on every single row when the user can just click
    directly on the item? I'm not saying that the "select button" model is
    bad, just that it shouldn't be the only approach.

    My solution, at least for now, is to turn one of the columns into a
    hyperlink column (my grid is narrow so this seems to work for my app).
    If I wanted to select an entire row, I would probably attempt to write
    some javascript code to catch the event. One problem I have with this
    approach is that I can't seem to trick the grid into thinking that I've
    clicked on the Select button.

    I prefer to use a single click rather than a double click for most web
    page actions. I usually use a highlighting approach, so that when the
    mouse moves over a clickable row, the background color of the row is
    changed, letting the user know that this is selectable.

    -- jeff
    jd, Apr 18, 2006
    #4
  5. RS

    RS Guest

    Thanks Jeff, Linkbuttons worked for me. MS should think of all the
    possibilities from the user's point of view, not all the user's have
    high resulution monitors, scrolling could become a pain in the butt. I
    followed your suggestions and created template columns with link buttons
    RS, Apr 21, 2006
    #5
  6. RS

    Guest

    Hi,

    I have a gridview and am adding a column as follows.

    <asp:DataGrid ID="MovieListGrid" Runat="server" OnSelectedIndexChanged
    ="OnMovieListGrid_RowSelectionChanged" >
    <SelectedItemStyle BackColor="DarkKhaki" />
    <Columns>
    <asp:ButtonColumn ButtonType="LinkButton"
    CommandName="Select" Text="Select"/>
    </Columns>
    </asp:DataGrid>

    I then attach a dataset to grid with Autogeneratecolumns property set
    to true. The whole purpose of doing this is to capture the row selected
    by the user and based on the selected row we need to do some
    processing.

    The issue is with above code I am able to get the Row selected by user
    ( when user presses select button ) but due to postback the screen is
    refreshed and this is what I would like to avoid.

    Any clues as to how to avoid the refresh issue.

    The reason
    , May 4, 2006
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Fernando Lopes
    Replies:
    0
    Views:
    3,190
    Fernando Lopes
    Apr 28, 2005
  2. =?Utf-8?B?RGFiYmxlcg==?=

    select gridview row without using select button?

    =?Utf-8?B?RGFiYmxlcg==?=, Mar 3, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    101,524
    dch31969
    Feb 27, 2009
  3. H5N1
    Replies:
    0
    Views:
    2,714
  4. Replies:
    5
    Views:
    656
  5. Dennis Fricker

    doubleclick row vs. ButtonColumns' click event

    Dennis Fricker, Oct 20, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    117
    Dennis Fricker
    Oct 20, 2004
Loading...

Share This Page