locked
Sub-Grid - Show data and chart by DEFAULT ??? CRM 2011 RRS feed

  • Question

  • In an any form we can add a sub-grid with data, and specify that the sub-grid can have a chart.  The way is to click on the sub-grid, then ‘chart pane’, then select Right.    

    By default I want to have selected Right. How can we do this programmatically, by onload event via javascript or another way?

    Thanks....



    Waheed

    Thursday, February 9, 2012 5:41 AM

Answers

  • I got this thing. See following function :

     

    function showChart(subGridName) {

                    var $v_0 = subGridName,

                                    $v_1 = $v_0 + "_visualizationCompositeControl",

                                    $v_2 = $find($v_1);

                    if ($v_2.isChartEnabled() && $v_2.isGridEnabled()) if (!IsNull($v_2)) {

                                    $v_2.showVisualization();

                    }

    }

     

    You can add this on your library and call passing a value for the subGridName parameter.

    subGridName is the unique name specified in the property of the subgrid control on the form.


    Waheed

    • Marked as answer by Waheed Ul Haq Monday, February 13, 2012 5:18 AM
    Monday, February 13, 2012 5:18 AM

All replies

  • Hi,

    Displaying an open chart in a subgrid on a form is not supported currently, sorry about that!

    One way you can achieve somewhat close behavior is to add a 4 column section the the form, then add a subgrid that spans 3 columns along with a 'chart only' subgrid that spans 1 column.

    See if that will work for now.

    Thank you,

    RBaliga

    Monday, February 13, 2012 5:14 AM
  • I got this thing. See following function :

     

    function showChart(subGridName) {

                    var $v_0 = subGridName,

                                    $v_1 = $v_0 + "_visualizationCompositeControl",

                                    $v_2 = $find($v_1);

                    if ($v_2.isChartEnabled() && $v_2.isGridEnabled()) if (!IsNull($v_2)) {

                                    $v_2.showVisualization();

                    }

    }

     

    You can add this on your library and call passing a value for the subGridName parameter.

    subGridName is the unique name specified in the property of the subgrid control on the form.


    Waheed

    • Marked as answer by Waheed Ul Haq Monday, February 13, 2012 5:18 AM
    Monday, February 13, 2012 5:18 AM