G
Guest
I want to know how to make a clickable button or Command field on a
GridView, and have the user's action a) fire a function and b) pass a data
value from one of the GridView's columns to that function.
Long version: ASP.NET's usual paradigm with master-detail editing is to have
you define a commandfield, and on your detail view to define a second
datasource that uses the SelectedValue of the GridView to determine what the
detail record is.
I'm using an ORM framework and for whatever reason I would simply like to a)
grab the ContentID of the record selected on the GridView and b) use that
value to grab my detail view without going through SqlDataSource.
I could hack this up by just passing a QueryString parameter and posting
back to my form, but I'd prefer to know a more direct and less hack-y
approach.
Thanks for any help you can offer.
-KF
GridView, and have the user's action a) fire a function and b) pass a data
value from one of the GridView's columns to that function.
Long version: ASP.NET's usual paradigm with master-detail editing is to have
you define a commandfield, and on your detail view to define a second
datasource that uses the SelectedValue of the GridView to determine what the
detail record is.
I'm using an ORM framework and for whatever reason I would simply like to a)
grab the ContentID of the record selected on the GridView and b) use that
value to grab my detail view without going through SqlDataSource.
I could hack this up by just passing a QueryString parameter and posting
back to my form, but I'd prefer to know a more direct and less hack-y
approach.
Thanks for any help you can offer.
-KF