Monday, March 26, 2012

Trigger a ModalPopupExtender from LinkButton in a column on a GridviewRow

Hi,

Has anyone got any sample code for using a linkbutton in gridview as the targetcontrol for a modalpopupextender. I have tried several ways but it seems the clientsideid is only temporary since it won't using it.

Any ideas or thoughts in this will be helpful.

Frederik

If you create on Modal Popup Control outside of the gridview and point it at a dummy button (which you can hide), then you can find the modal popup from client side code (called by your linkbutton) using $find(), and then call the modal popup's show() method to get it to pop-up.


I am guessing that you probably want to load up the modalpopup with content related to a row in the grid. In this case, you might want to postback to the server, load the content and then show the modalpopup by calling the Show() method all from code behind. You will still need to use a dummy button as outlined by skirkland so that you can programmatically control the modalpopup visibility.

No comments:

Post a Comment