Jump to content

aln02

uniGUI Subscriber
  • Posts

    57
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by aln02

  1. Hi.

    I'm trying to pay the Renew/Upgrade, but failed. FastSpring gives an error message:

     

    <We regret that your payment or order could not be accepted. There are many reasons why this might occur. We value your business and would like to help you complete this order. Please contact us for assistance.>

     

    thanks

  2. Hi.

     

    Try:

    1.
    UniDBGrid1 -> ....
    function afterrender(sender, eOpts)
    {
      sender.pagingBar.getComponent("refresh").handler = function () {
        ajaxRequest(MainForm.window, 'Grid1Refresh', []);
      }
    }

     

    2.
    MainForm.UniFormAjaxEvent(Sender: TComponent; EventName: string;
      Params: TStrings);
    begin
     if EventName='Grid1Refresh'
     then UniMainModule.ClientDataSet1.Refresh;
    end;

  3. Hi.

    You can make so:


    function OnReconfigure(sender, store, colModel)
    {
    sender.headerCt.forceFit=true;
    }



    or, for specified columns:





    function OnReconfigure(sender, store, colModel)
    {
    if (!sender.columnManager) {
    sender.columns[0].flex=1;
    } else {
    sender.columnManager.columns[0].flex=1;
    }

    }



    in unidbgrid.ClientEvents.ExtEvents

    • Upvote 2
  4. also

    for certain columns you can make, for example:

     

    function OnReconfigure(sender, store, colModel)
    {var col;

    if (!sender.columnManager) {
    col=sender.columns;
    } else {
    col=sender.columnManager.columns;
    }
    col[0].flex=1;
    col[2].flex=1;
    col[5].flex=1;

    }

  5. Hi. 

    You can make so:
     

    function OnReconfigure(sender, store, colModel)
    {
    sender.headerCt.forceFit=true;
    }

     

    or, for specified columns:

     

     

    function OnReconfigure(sender, store, colModel)
    {
    if (!sender.columnManager) {
    sender.columns[0].flex=1;
    } else {
    sender.columnManager.columns[0].flex=1;
    }

    }

     

    in unidbgrid.ClientEvents.ExtEvents

  6. IMHO, it is better to place this code in MainForm.Script. It works in both cases (mfPage, mfWindow)

    for example:

    function bunload(){
    dontleave="Are you sure? The program will be closed!";
    return dontleave;
    };
    function ounload(){
    ajaxRequest(MainForm.window, 'SessionClosed', [] );
    };

    onbeforeunload = bunload;
    onunload=ounload;

     

     

    for me, it works on FF, IE, Chrome. But Opera doesn't support both events (((. 

    • Upvote 2
  7. Maybe it will help:

     

    if unidbgrid.WebOptions.Paged then
    UniSession.AddJS('setTimeout(function () {'+
            'MainForm.unidbgrid.getView().focusRow('+IntToStr((unidbgrid.datasource.dataset.RecNo mod unidbgrid.WebOptions.PageSize)-1)+');'+
        '}, 100);'
    )
    else
    UniSession.AddJS('setTimeout(function () {'+
            'MainForm.unidbgrid.getView().focusRow('+IntToStr(unidbgrid.datasource.dataset.RecNo-1)+');'+
        '}, 100);'
    );

     

    It works for me))

    • Upvote 1
×
×
  • Create New...