Home All Groups Group Topic Archive Search About
Author
10 Sep 2007 7:24 PM
SE.Computerguy
I am trying to use the AJAX modal popup on a click event from a
gridview. Any ideas on implementing this? The AJAX control is looking
for a TargetControlID that will trigger the popup but the button field
in the grid does not have an ID.

Doug

Author
10 Sep 2007 8:09 PM
Teemu Keiski
Hi,

why don't you use Button control directly on grid (instead of ButtonField)?

--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net

Show quote
"SE.Computerguy" <SE.computer***@gmail.com> wrote in message
news:1189452290.644895.187520@50g2000hsm.googlegroups.com...
>I am trying to use the AJAX modal popup on a click event from a
> gridview. Any ideas on implementing this? The AJAX control is looking
> for a TargetControlID that will trigger the popup but the button field
> in the grid does not have an ID.
>
> Doug
>
Author
11 Sep 2007 2:40 PM
SE.Computerguy
Show quote
On Sep 10, 3:09 pm, "Teemu Keiski" <jot***@aspalliance.com> wrote:
> Hi,
>
> why don't you use Button control directly on grid (instead of ButtonField)?
>
> --
> Teemu Keiski
> AspInsider, ASP.NET MVPhttp://blogs.aspadvice.com/jotekehttp://teemukeiski.net
>
> "SE.Computerguy" <SE.computer***@gmail.com> wrote in message
>
> news:1189452290.644895.187520@50g2000hsm.googlegroups.com...
>
>
>
> >I am trying to use the AJAX modal popup on a click event from a
> > gridview. Any ideas on implementing this? The AJAX control is looking
> > for a TargetControlID that will trigger the popup but the button field
> > in the grid does not have an ID.
>
> > Doug- Hide quoted text -
>
> - Show quoted text -

I need reference to the row of data that is being selected. If I don't
use the select button I don't get it.
Author
11 Sep 2007 10:28 AM
Ralf Kaiser
"SE.Computerguy" <SE.computer***@gmail.com> schrieb im Newsbeitrag
news:1189452290.644895.187520@50g2000hsm.googlegroups.com...
>I am trying to use the AJAX modal popup on a click event from a
> gridview. Any ideas on implementing this? The AJAX control is looking
> for a TargetControlID that will trigger the popup but the button field
> in the grid does not have an ID.

Hi,

you can use an invisible button for the TargetControlID. Just place a button
on your form and set "display: none;" in the style of the button (or assign
a CSS class that hides it). After that you can call the "show()" method of
the modal popup from your event.

Note that you cannot use "Button.Visible = false" because that would not
render the button to the output HTML!

Ciao,
Ralf
Author
11 Sep 2007 2:37 PM
SE.Computerguy
I guess I did not completely explain what I am doing. I have a select
button in the grid so the user can select a row in the grid and on the
event I pass that row of data to another, modal, window. I want to
replace the existing window.showModalDialog call I have with the AJAX
modal window.
In a template field I can add a button but in order to have the modal
window open on the select button event I would need to tie it to the
button_click event for the AJAX modal to open.

Show quote
On Sep 11, 5:28 am, "Ralf Kaiser" <r***@lingosmart.de> wrote:
> "SE.Computerguy" <SE.computer***@gmail.com> schrieb im Newsbeitragnews:1189452290.644895.187***@50g2000hsm.googlegroups.com...
>
> >I am trying to use the AJAX modal popup on a click event from a
> > gridview. Any ideas on implementing this? The AJAX control is looking
> > for a TargetControlID that will trigger the popup but the button field
> > in the grid does not have an ID.
>
> Hi,
>
> you can use an invisible button for the TargetControlID. Just place a button
> on your form and set "display: none;" in the style of the button (or assign
> a CSS class that hides it). After that you can call the "show()" method of
> the modal popup from your event.
>
> Note that you cannot use "Button.Visible = false" because that would not
> render the button to the output HTML!
>
> Ciao,
> Ralf

AddThis Social Bookmark Button