Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mercury85

Pages: 1 2 3 [4]
46
http://jsfiddle.net/mgregory85/ntfn3q9h/

Wrong URL and strange I couldn't modify it.

Cheers.

47
Help for ParamQuery Pro / Re: Custom Aggregations
« on: April 26, 2018, 05:50:01 am »
Hey there,  I was looking at ways to look at values, not sure if this would be similar.  But maybe we can inject these into rows if possible...




var data = grid.options.dataModel.data;

var TargetColumn = "Type",
TargetSummary = "[Total Wow Likes]",
SummaryList = [];

for(var i=0, len = data.length; i<len; i++){
       var rowData = data;         
           if(rowData[TargetColumn] == TargetSummary){         
               
               Object.keys(rowData).forEach(function (key) {
               if (key.match(/C.*/))
               {            
               debugger
               SummaryList.push({"Name": TargetSummary, ID: key, key: rowData[key]});   
               }        
        });
}}   

48
Thought I would share on a common scenario that we run into with our users where they are entering into some data collection grid that helps them keep track where and what they have completed.

http://jsfiddle.net/mgregory85/xLqg4mzg/

49
Help for ParamQuery Pro / Re: Custom Aggregations
« on: April 26, 2018, 12:21:47 am »
Thanks for the quick reply, does JS formulas work on hidden columns by any chance, if that were the case, bringing in some more fields wouldn't be too bad.  I am going to look into the nested groupings, curious if we can extract numbers from the nested items.

50
Help for ParamQuery Pro / Re: Custom Aggregations
« on: April 25, 2018, 11:01:36 pm »
Just to be clear, we are limited to a one dimensional array of numbers associated with the column as the array identifier...  There is no way we can manipulate to a 2 dimensional array, or maybe a concatenated array to somehow throw conditions on the aggregations?

Or is there possibilities of nested grouping and details and pull values up from there?

51
Help for ParamQuery Pro / Custom Aggregations
« on: April 25, 2018, 10:29:23 pm »
Hi everyone,

I was wondering if there was a little more guidance on custom aggregations.

For example lets say we had a 3 tier group, but the lowest group had a couple of children.  I dont want to see all the children summing up to the top, but rather see only 1 of the children totals.  I have included a picture of my thought on this.  Where at the lowest level, I am looking at dirty and clean clothes, but when I roll it up, I only want to see my clothes summing up, not the dirty ones.

Thanks!!!!




52
I figure I will reply to my own questions as it may help others.

I am trying to improve the flexibility and figured I would share. 

Here is my take on my posted question on bringing in the object properties using an array of objects, sat there for a bit until I realized I needed to set async to false, and not bring the string in, but the objects...

I am building on top of existing examples from our administrator, thanks for providing the barebones ParamQuery!!

http://jsfiddle.net/mgregoryibp/ntfn3q9h/

53
Ok, maybe I am trying to accomplish too much at one step,  I have been reading thru everything and I am thinking may just have a structured source table of x and just do dynamic titles based on the requirement in an array....

I was wanting to store the colM string then just do a pull by having some column flag of 1 or 0... Reviewing documentation we can do a tableToArray( $table ), but I don't want all the items from the data to be in the column model, the other columns on the source will identify format, edit fields, other parameters, etc...

Just curious if the flexibility is there, or am I to go on a set structure that I am thinking, then we do an array of objects for data, or do we do array of array then make an array for the title.

IE:
    var ttlIndx = ['Col1', 'Col2', 'Col3', 'Col4', 'Col5'];
    var editIndx = [false, false, true, true, true]

    var colM = [{title: ttlIndx[0], editable: editIndx[0], dataIndx:  ttlIndx[0],  ...}

Either way any property I can call from a REST and the var = Rest call from Ajax.  Just trying to avoid a static approach on this..

Thoughts if this would be the correct approach.  Please and thank you!!!

54
ParamQuery Pro Evaluation Support / Dynamic Column Binding From JSON
« on: April 21, 2018, 11:39:22 am »
I was curious, I tried making columns dynamic defined in a JSON... Is it possible to get get columns like:

  var colM = {
        location: "remote",
        recIndx: "dcol",
        dataType: "JSON",
        method: "GET",
        url: "/Content/collcolmodel.json",
    };

dcol is where the colM model is nested, or can I just call "title":"" if this is possible?

I want to have the ability to store different definitions of the object model and just call from REST.

55
Perfect, working nice now...  Proof of Concept is coming together real nice..

56
Update**
I followed this thinking it was similar...

https://paramquery.com/pro/demos/treegrid


I looked at this example on your treeview, looks good.  ran debugger and it assigned all the values accordingly but thinking it did not work because the columns are hidden and the one column grouping is the only item showing...

  stripeRows: false,
        rowInit: function(ui){
         var rd = ui.rowData, color = ["lightyellow","lightgreen","pink","lightblue"];
         if( rd.pq_gsummary ){            
            return {style:"background:" + color[rd.pq_level] + ";"};
         }
      },

57
More Specifically, alternate the row colors by the 1 column grouping.

Thank you !!!!

58
groupModel.titleCls and groupModel.summaryCls are unsupported. Instead use rowInit and column.render to inject classes

I am wondering if there are any examples for the new options.  Looking thru all the examples, and I do not see color unless it is on the old demos.

Pages: 1 2 3 [4]