views:

33

answers:

1

Before you say it, I'm perfectly aware that a data repeater could do it, but I'm looking for the solution using a GridView.

I'm implementing a jQuery feature and require unique ID's to be applied to individual rows in order to respond to click events in the correct manner. I can't see how you're supposed to apply values to an ID or a row.

Basically I'm looking at doing something along the lines of

$('tr').click(function() {
    // get the ID of the tr and redirect the page based on that
});

EDIT: Oh, and I can do it for a row cell if that's the value I want to pass as the query string, however, I don't want to do that as it'd mean displaying a unique identifier which is something the user shouldn't be able to see.

+1  A: 

Okay, I didn't expect to actually solve my own question. Just for reference, here it is:

If e.Row.RowType = DataControlRowType.DataRow Then
  e.Row.ID = e.Row.DataItem("Issue_Key")
End If

which is placed in the RowDataBound event.

Kezzer