Gridview doubleclick to select the row

R

RS

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
 
J

Jan Hyde

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)
 
R

RS

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.
 
J

jd

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
 
R

RS

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
 
S

sachinvyas

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top