Welcome Guest Search | Active Topics | Sign In | Register

Dialog Close set gridview SelectedIndex to -1 Options
Sarge
Posted: Wednesday, September 19, 2007 9:22:55 AM

Rank: Member
Groups: Member

Joined: 9/14/2007
Posts: 21
I have a dialog that is being opened by a row selection from a gridview. Problem is, if the user selects the close button (little x in top right hand corner) there is no way to fire an event to cause the gridviews SelectedIndex to be set to -1. I see a way to fire a javascript event, but I don't know how to set a gridviews SelectedIndex to -1 in javascript.
I would like to keep the close button, but need to make sure that SelectedIndex gets changed or the dialog will reopen upon a postback.
Any ideas?

David L. Sargent
Developer
Washington State University
eo_support
Posted: Wednesday, September 19, 2007 10:02:44 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,090
Obviously you can't change SelectedIndex on the client side. You will need to use JavaScript to trigger a server postback and then reset SelectedIndex on the server side. One way to do this is using our CallbackPanel control, another way is to call __doPostBack directly. Either way the goal is to postback the page and get control back to the server side.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.