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
105
webdialogwindow causing a page postback when setting the contenturl on the client
posted

Hi, I am having a problem with the dialog causing the page postbacks when I set the contenturl address in javascript on the client.  Other Ajax behavior works OK (such as sorting, etc...), but as soon the call to dlg.get_contentPane().set_contentUrl("ViewonlyRecord.aspx?r=" + v); is executed the browser does a full page postback.  I verified this by commenting only this line and no more postbacks.

The wanted behavior is to display a record view page when the record's row is double-clicked in the grid, how can I accomplish this without the full postback?

The below code is abbreviated but the basic structure is identical.

Thanks

Ali M.

 

function grdItems_DblClick() {

      var grid = igtbl_getGridById("ctl00_ContentPlaceHolder1_grdResults");
      var row = grid.getActiveRow();
      if (row) {
        var dlg = $find("ctl00_ContentPlaceHolder1_dlgView");
        try {
          if (dlg) {
            var v = row.getCell(1).getValue();
            dlg.get_contentPane().set_contentUrl("ViewonlyRecord.aspx?r=" + v);
            dlg.show();
          }
        }
        catch (e)
        { alert("Error in viewCurrent" + e); }
      return false;
    };

 

<igmisc:WebAsyncRefreshPanel ID="WebAsyncRefreshPanel1" runat="server" Width="100%">

  <igtbl:UltraWebGrid ID="grdResults" runat="server" EnableAppStyling="True">

    <DisplayLayout .... ClientSideEvents-DblClickHandler="grdItems_DblClick" />

  </igtbl:UltraWebGrid>

  <ig:WebDialogWindow ID="dlgView" runat="server" ..... >

    <ContentPane ContentUrl="about:blank" .../>

  </ig:WebDialogWindow>

</igmisc:WebAsyncRefreshPanel>

Parents Reply Children
No Data