jQWidgets Forums

jQuery UI Widgets Forums Grid grid and buttonclick

This topic contains 3 replies, has 2 voices, and was last updated by  Vladimir 9 years, 9 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • grid and buttonclick #75817

    nico86
    Participant

    Hello,
    In my grid , i have a column (xls) with a button
    on buttonclick i would like
    -append a new div (messagerror-2) on #tabs-5,
    -and after click on this new div (messagerror-2) (same problem with #test)

    but the $(“#messagerror-2”).click() doesn’t run.

    I think all action is doing at the same time, could you help me ? is there a solution ?
    Thanks

    					{ text: 'XLS', datafield: 'Edit', columntype: 'button', enabletooltips: false, cellsrenderer: function () {
    							return " ";
    						}, buttonclick: function (row) {
    							identity= $("#jqxgrid_mmr").jqxGrid('getcellvalue', row, 'PATIDENT'); /*VALUE OF THE FIELD NAME OF THE LINE MODIFIED */;
    							
    				$("#tabs-5").append('<div id="messagerror-2"><A id=test" HREF="http:'+server_sp+'/Coding/VALDOMED/mmr/mmr_print&indts='+indts+'&product='+product+'&study='+study+'&expltn='+expltn+'&lib='+lib+'&mode=print'+'&patidid='+identity+'">Click here to open patient report</A>');		
    				$("#messagerror-2").click();
    				
    grid and buttonclick #75820

    Vladimir
    Participant

    Hello nico86,

    The above code will not run the click, because jQuery .click() does not trigger anchor links. It only triggers the functions that are attatched to the onClick event.
    If you want to force the redirect you have to do it in another way.

    Best Regards,
    Vladimir

    jQWidgets Team
    http://www.jqwidgets.com

    grid and buttonclick #75842

    nico86
    Participant

    Thanks for your response, i know that isn’t jqxgrid support but have you any idea of the good way for my problem.

    grid and buttonclick #75843

    Vladimir
    Participant

    Hello nico86,

    If a page redirect is what you need, you can use the window.location object. Though if you are going to follow the link in a newly created div, I don’t understand why don’t you redirect the page directly, instead of adding an anchor element and trying to click it.

    Best Regards,
    Vladimir

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.