Open pop up with additional data

3 posts, 0 answers
  1. Andy Green
    Andy Green avatar
    342 posts
    Member since:
    Aug 2008

    Posted 21 Jun Link to this post

    Hi

    Looking for some direction here:

    I have a grid that I bind with data, and I have an imageButton control that I want to use to open a pop up with more data, but I don't want to do another database call, so the data in the pop up must be bound when the grid binds.

    Any ideas / examples on how to achieve this.

    Andy

     

     

  2. Andy Green
    Andy Green avatar
    342 posts
    Member since:
    Aug 2008

    Posted 22 Jun in reply to Andy Green Link to this post

    Hi

    Further to this I have a near working solution using your examples here: http://demos.telerik.com/aspnet-ajax/tooltip/examples/databasetooltipswithoutlod/defaultcs.aspx

     

    All I need to achieve this is to change the target from the row, to an image button in the grid, and use its onClick event.

    This is the JS from the example:

    (function (global, undefined) {
    var affectedSessions = global.affectedSessions = {
    createContent: function (sender, args) {
    //copy the content first to allow the browser to cache the image
    sender.set_content($get("ttipContent").innerHTML);
    var dataKeys = sender.get_value().split("|");
    var ttipParent = sender.get_popupElement();
    $get("idHolder", ttipParent).innerHTML = dataKeys[0];
    $get("nameHolder", ttipParent).innerHTML = dataKeys[1];
    $get("locationNameHolder", ttipParent).innerHTML = dataKeys[2];
    $get("startHolder", ttipParent).innerHTML = dataKeys[3];
    $get("endHolder", ttipParent).innerHTML = dataKeys[4];
    }
    }
    })(window);

    And the Markup from the desired target button:

    <telerik:GridButtonColumn ButtonType="ImageButton" UniqueName="ViewSessions" ><HeaderStyle Width="1px" /><ItemStyle Width="1px" /></telerik:GridButtonColumn>

    How could I achieve this?

    Andy

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Andy Green
    Andy Green avatar
    342 posts
    Member since:
    Aug 2008

    Posted 23 Jun in reply to Andy Green Link to this post

    Hi

    I have this working now, for the community what I did was very simple, I get a handle on the image button:

    ImageButton ShowSessions = (ImageButton) RowDataItem["ViewSessions"].Controls[0];

    And in the code behind changed the ID of the target:

    this.RadToolTipManager.TargetControls.Add(ShowSessions.ClientID, ttipValue, true);

     

    Andy

Back to Top