AJAX Modal Popup

Discussion in 'ASP .Net Web Controls' started by SE.Computerguy, Sep 10, 2007.

  1. 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
    SE.Computerguy, Sep 10, 2007
    #1
    1. Advertising

  2. SE.Computerguy

    Teemu Keiski Guest

    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

    "SE.Computerguy" <> wrote in message
    news:...
    >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
    >
    Teemu Keiski, Sep 10, 2007
    #2
    1. Advertising

  3. SE.Computerguy

    Ralf Kaiser Guest

    "SE.Computerguy" <> schrieb im Newsbeitrag
    news:...
    >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
    Ralf Kaiser, Sep 11, 2007
    #3
  4. 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.

    On Sep 11, 5:28 am, "Ralf Kaiser" <> wrote:
    > "SE.Computerguy" <> schrieb im Newsbeitragnews:...
    >
    > >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
    SE.Computerguy, Sep 11, 2007
    #4
  5. On Sep 10, 3:09 pm, "Teemu Keiski" <> 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" <> wrote in message
    >
    > news:...
    >
    >
    >
    > >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.
    SE.Computerguy, Sep 11, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Not Me

    AJAX.net modal popup

    Not Me, Jan 5, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    3,974
    Not Me
    Jan 8, 2007
  2. Samuel Rhodes

    AJAX Modal Popup disappearance

    Samuel Rhodes, Apr 20, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    2,251
    Lloyd Sheen
    Apr 20, 2007
  3. =?Utf-8?B?QWxCcnVBbg==?=

    AJAX modal popup displays when it shouldn't

    =?Utf-8?B?QWxCcnVBbg==?=, May 30, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    330
    =?Utf-8?B?QWxCcnVBbg==?=
    May 30, 2007
  4. SE.Computerguy

    AJAX Modal Popup

    SE.Computerguy, Sep 10, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    633
    SE.Computerguy
    Sep 11, 2007
  5. using Ajax Modal popup

    , Apr 24, 2008, in forum: ASP .Net
    Replies:
    2
    Views:
    2,518
Loading...

Share This Page