qListView - Custom Display - Results Body Fields? - SharePoint Customization - SharePoint for All - Dell Community

qListView - Custom Display - Results Body Fields?

qListView - Custom Display - Results Body Fields?

This question has been answered by kenny.wu-quest

I'm finding the documentation to be a bit sparse on what I'm able to do in the results body field of a custom display.  I know I have the field names and formatting but is there the ability to display grouped or aggregate values?

Verified Answer
  • Hello,

     

    No, I don’t think that setting can affect the grouped or the aggregate value. The body filed means the script will be invoked when rows are rendering in the front-end. For example, if you have five rows in qListView, the code in the body field will be called in every row rendering(5 times).

     

    But on the other hand, because that code is running on the front-end, that give you a very flexible way to do your job. For your case, I think you do not need to set the body field, just add the script in the header filed for formatting the grouped/aggregated value. The script in the header will be run in one time. For example:

    Results Header:

     

    <script>

                    //get the field, the ‘$telerik.$’ is the jQuery object.

                    var theField = $telerik.$(‘…’);

                  //format it..

    </script>

     

     

    Kenny.

All Replies
  • Hello,

     

    No, I don’t think that setting can affect the grouped or the aggregate value. The body filed means the script will be invoked when rows are rendering in the front-end. For example, if you have five rows in qListView, the code in the body field will be called in every row rendering(5 times).

     

    But on the other hand, because that code is running on the front-end, that give you a very flexible way to do your job. For your case, I think you do not need to set the body field, just add the script in the header filed for formatting the grouped/aggregated value. The script in the header will be run in one time. For example:

    Results Header:

     

    <script>

                    //get the field, the ‘$telerik.$’ is the jQuery object.

                    var theField = $telerik.$(‘…’);

                  //format it..

    </script>

     

     

    Kenny.

  • Thanks Kenny - that's one of the options I was going to do but I was hoping to be able to use the built in aggregate functionality - something like <%sum aggregate:field name%> that I could throw into the Results Header.