• Control in a datatable row

    By Jason R Baird 1 decade ago

    I'm having a heck of a time trying to basically put a chart on the end of each row of data in a datatable.  Can this work?

     

    • Some more details required

      By Naveen Maurya 1 decade ago

      I haven't tried putting charts in Data table. I would be of great help if you can provide more details of the problem you are facing.

      Regards,

      Naveen

      • Details

        By Jason R Baird 1 decade ago

        Basically what I am seeing is this, I have a static array for the series and categories then building another array of 4 elements using row data that I think should be available but it says that "row" does not exist however the charting control lives in one of the columns.  So then I thought it could just be a limitation.. tried a few other things. To no avail... even bringing it down to the simplest level.

        var categories = new Array();
        categories[0] = "zero";
        return categories;

        var series = new Array();
        series[0] = "this";
        return series;

        try{
        var values1 = new Array();
        values1[0] = row.afield
        }catch(e){viewScope.err = e.message}

        viewScope.err returns with "row" doesn't exist.?  Does that help?  Thanks in advance!

        • This seems to be a limitation!

          By Naveen Maurya 1 decade ago

          Hi,

          Thanks for the details.

          This issue seems to be a limitation. In each of the custom controls in the event beforePageLoad, code is written to put all the information passed on to CC into sessionScope which is then utilized to generate the chart.

          When the CC is put into data table and you use the collection name, it gets evaluated after the beforePageLoad event, I guess, and it is evaluated for every row.

          I am currently working on next version and I will look into this. But I cannot guarantee if I would be able to come up with a fix for this one as the current architecture may not be able to handle this. So I am forced to think if CC is put into repeat control it may give the same issue, I haven't tried it though.

          Thanks for pointing out this issue.

          Regards,

          Naveen