Select gridview record with mouseclick
How might it be possible to select a gridview record with a mouse click?
I'm building a gridview that will use custom column templates. I recognize that gridview provides a "select" button feature. However, I'd like to be able to select a particular record
by having the user click anywhere on the custom column template. (Reason is I'm then going to show a context menu).
I think this breaks down into two parts: sensitizing the template for clicks (by enabling events for it), and then associating the click with a record identifier of some kind (which
would be in a control in the gridview record, if not in the column template itself), so I can tell which record was clicked. (It doesn't have to be relative position in the gridview, just the
record id from the record would be sufficient....using relative row position would seem to be a very long path to get the information...%-}
If I have to sensitize all the controls within the template, as well as the template itself,(because maybe the controls would "block" the template) that would be ok, as long as I could still figure out which record was clicked on.
Any guidance on this would be appreciated.
Thanks!
|