Operations in pivot grid.How to make them as default

Hi @Helga
https://snippet.webix.com/gprqv3wv
If you see the above snippet ,When u click on the "click here to configure", when we drag the fields to value ,we get the default operation has Sum except oil and continent because we have mentioned the operation in the values.
values: [{ name:"oil", operation:"max"}, { name:"continent", operation:"string" }].

Is there any way to change it "String"(custom operation) for all the fields which ever we drag and drop

Tagged:

Comments

  • Hello,

    You can handle the onBeforeAdd event of the values list and define the operation explicitely as "string":

    popup:{
        on:{
          onViewInit: function(name, config){
            if(name == "values")
             config.on.onBeforeAdd = function(id, obj){
                obj.operation = "string";
             }
          }
       }
    }
    

    Check the snippet, please: https://snippet.webix.com/cplot61n

  • Thanks a lot @Helga :)

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!