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
25
UltraWebGrid Formula and UltraWebCalcManager
posted

I have a grid that contains the columns: Quantity (numeric), From(date), To(date), Total(custom format)

I would like to insert into the column Total the result of doing: Quantity * datediff(From, To)

The result needs to be formatted in the following format: HHH:MM. Example 120:30.

My questions are:

1) Is there any formula, or group of formulas that I can use to achieve this goal?

2) How can I configure the Grid to recalculate total automatically (on client side) when Quantity is changed?

3) Is there any Manual or Reference guide where I can take a look to the list of functions that I can use inside Formula Field?

            myGrid.CalcManager = calcmgr;
            myGrid.Columns.FromKey("Total").Formula = "????"; // What should I put here?

Thank you

Parents
  • 25
    posted

    I think this one will handle 1). Except someone else has a better approach.

    Regarding 3) I founded already.

    string formula;

    formula = "concatenate(right(concatenate('000',int(datediff( 'n' , datevalue( '2010-10-12 15:00' ) , datevalue( '2010-10-12 15:26' )) * 3 / 60)),3) ";
    formula += " , ':', right(concatenate('00',mod(datediff( 'n' , datevalue( '2010-10-12 15:00' ) , datevalue( '2010-10-12 15:26' )) * 3 , 60)),2) )";

Reply Children
No Data