CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

IWCGCreateMessageDialog, message broken

by etwoss » 02 Oct 2014 08:52

Hi

Using this code:

Code: Select all
  LMessage :=  Format('Are you sure you want to cancel request %d for product ''%s'' ?',[LCancelOrderID,LCancelOrderDesc]);

  Dlg := IWCGCreateMessageDialog(LMessage, mtConfirmation, [mbYes,mbNo],
    procedure(Dialog: TIWCGJQMsgDialog; AResult: TModalResult)
    begin
      if AResult = mrYes then
      begin
        OrderItems.CancelOrder(LCancelOrderID, UserSession.IMSession);
        GridOrderItems.JQGridProviderCells.Rows.Delete(LRowIndex);
        ReloadGrid(GridOrderItems);
      end;

  end);

  Dlg.Width := 700;
  Dlg.Height:= 300;
  Dlg.JQDialogOptions.OnClose.OnEvent := DialogClose;

  if (CGIsCallbackProcessing) then
    Dlg.AjaxReRender();



The dialog is a lot wider and higher but my error message is still 'cut'in 4 lines, what can i do about this?

Tried to fill property Message but also no difference

Eric
You do not have the required permissions to view the files attached to this post.
etwoss
 
Posts: 1205
Joined: 06 Feb 2014 08:58

by etwoss » 02 Oct 2014 09:02

Hi


Noticed that if i use property Message but also use '' in the IWCGCreateMessageDialog, its seems to work:

Code: Select all
  Dlg := IWCGCreateMessageDialog('', mtConfirmation, [mbYes,mbNo],
    procedure(Dialog: TIWCGJQMsgDialog; AResult: TModalResult)
    begin
      if AResult = mrYes then
      begin
        OrderItems.CancelOrder(LCancelOrderID, UserSession.IMSession);
        GridOrderItems.JQGridProviderCells.Rows.Delete(LRowIndex);
        ReloadGrid(GridOrderItems);
      end;

  end);

  Dlg.Width := 500;
  Dlg.Height:= 150;
  Dlg.Message := LMessage;
  Dlg.JQDialogOptions.OnClose.OnEvent := DialogClose;

  if (CGIsCallbackProcessing) then
    Dlg.AjaxReRender();

etwoss
 
Posts: 1205
Joined: 06 Feb 2014 08:58


Return to IWCGJQMessageDlg

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.