Xaisoft
Xaisoft

Reputation: 46591

Show/Hide an accordion panel in Jquery when clicking edit in a gridview?

I have a Jquery Accordion and I have a asp.net GridView below that. When I click on the edit button in a gridview row, it goes and grabs some data. Depending on which row is clicked, I want to show/hide an accordion panel. Can I accomplish this in the GridView_RowEditing event, if so, how?

Upvotes: 2

Views: 2553

Answers (1)

Dan Williams
Dan Williams

Reputation: 4950

ClientScript.RegisterStartupScript
(Me.GetType(), "ClientScript", "$(document).ready(function(){$('#accordion').accordion('activate', parseInt(theIndex));}", True)

So, I haven't tried this, but it seems like it should work. But you might have to play with it a little, theIndex will need to variable passed in from the grid row.

Upvotes: 1

Related Questions