Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1405
Popup
posted

I have a webhierarchicaldatagrid and on its first cell mouse hover I want a small popup to open which has three links: Edit, Copy, and View. By clicking on these links I navigate to another page where the values for that row are already populated. I have used jquery to open the popup but I want to pass all the columns for that row as parameter to the jquery function so that these values are again passed as paramater to another page. How can I do that ? Here is my sample:

The template column :

 <Columns>
                <ig:TemplateDataField Key="Proj_Type_ID">
                    <ItemTemplate>
                       <a href="#" style="font-size:small" class="alertLink"   ><%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "Proj_Type_ID") %></a>
                       
                    </ItemTemplate>
                    <Header Text="Proj_Type_ID" />
                </ig:TemplateDataField>

 

 

Jquery function :

 <script type="text/javascript">

         $(document).ready(function () {

             $('.alertLink').hover(function (e) {
                 var mouseFromLeft = e.pageX;
                 var mouseFromTop = e.pageY;
                 var content = new Object();
              
                 content.link_Edit = '<a href="Home_Edit.aspx? ">Edit</a>';
                 content.link_Copy = '<a href="Home_Edit.aspx">Copy</a>';
                 content.link_View = '<a href="Home_Edit.aspx">View</a>';

                 var header = $('<div />').addClass('cAlertHeader').text('Project Details');

                 var content = $('<div />').addClass('cAlertContent').html(content.link_Edit + " " + content.link_Copy + "  " + content.link_View);

                 $('<div />').attr('id', 'myAlertBox').addClass('cAlert').css({ 'top': mouseFromTop, 'left': mouseFromLeft }).append(header).append(content).appendTo('body');

                 $('#myAlertBox').fadeIn('slow');
             });
         });

        </script>

 

Parents
No Data
Reply
  • 29417
    Suggested Answer
    Offline posted

    Hello mmegha ,

     

    Thank you for posting in our forum.

     

    A possible solution for your issue is to pass the values to the new page using QueryStrings. This approach is the simples and requires nothing more than adding the parameters and their values to the URL of the new page and then retrieving them from the second page. For example:

       content.link_Edit = '<a href="Home_Edit.aspx?' + "id=" + rowFromGrid.get_cell(0).get_value() + "&Item=" + rowFromGrid.get_cell(1).get_value() + "&Data=" + rowFromGrid.get_cell(2).get_value() + '">Edit</a>';

    And then retrieve them from the second page with: Request.QueryString[index];

          

    I’m attaching a sample for your reference.

     

    There are also other ways to pass information between page but all depends on your specific scenario. Here are some link that you might find useful:

    http://msdn.microsoft.com/en-us/library/6c3yckfw.aspx

    http://www.boutell.com/newfaq/creating/scriptpass.html

     

    Let me know if you need further assistance with this.

     

    Best Regards,

    Maya Kirova

    Developer Support Engineer

    Infragistics, Inc.

    http://ko.infragistics.com/support

     

    WHDG_PopUp.zip
Children
No Data