jQWidgets Forums

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: Export customise grid data Export customise grid data #56010

    manoj.singh
    Participant

    Hi Dimitar,

    Thanks for your reply and its working perfect.

    Thanks a lot.


    manoj.singh
    Participant

    Hello Peter,

    I apologize for my spelling mistake.

    I am using following code and its not working for me :
    ———-

    $(“#jqxgridS”).bind(‘bindingcomplete’, function (event) {

    var sourceOptions = [{ label: ‘Aircraft Type, Model’, value: ‘aircraft_type’ },
    { label: ‘Region Current Operator’, value: ‘current_operator_region’ },
    { label: ‘Region (lessor/owner)’, value: ‘lessor_owner_region’ },
    { label: ‘Current Operator’, value: ‘current_operator’ },
    { label: ‘Lessor/Owner’, value: ‘lessor_owner’ }];

    $(“#columnchooser”).jqxDropDownList({source:sourceOptions, autoDropDownHeight: true, selectedIndex: 0, width: 200, height: 25});
    $(“#columnchooser”).on(‘select’, function (event){ /*** some code ***/ });

    });

    And in grid i m using following code for toolbar.
    ————————————————–
    showtoolbar: true,
    rendertoolbar: function (toolbar) {

    var me = this;
    var container = $(“<div style=’margin:3px 10px; height:25px;’></div>”);
    toolbar.append(container);
    container.append(‘<div style=”float:left; padding-top:5px; font-weight:bold;”>Summary Report: </div>’);
    container.append(‘<div id=”columnchooser” style=”float:left; margin-left:5px;”></div>’);

    }

    Please suggest!!!!


    manoj.singh
    Participant

    Hello Peter,

    I have done changes suggested by you, but no luck!!!

    $(“#columnchooser”).jqxDropDownList({source:sourceOptions, autoDropDownHeight: true, selectedIndex: 0, width: 200, height: 25});
    $(“#columnchooser”).on(‘select’, function (event){ /*** some code ***/ });

    I have added above mentioned lines in grid’s ready function, but not working and than added on bindcompleted callback function, again not working.

    Can you please do let me know how to implement above mentioned code.

    My goal is : Add combobox in grid’s toolbar and on value selection of combo , grid will be reload with new data from DB.

    Please suggest!!!!!!!!


    manoj.singh
    Participant

    Thanks Peter, You give me the right direction to achieve my task goal.


    manoj.singh
    Participant

    Hi Peter,

    Here is my sample code.
    When I select option of combobox, error showing in console

    ——————————–

    $(“#jqxgridS”).jqxGrid(
    {
    width: ‘99.9%’,
    autoheight:true,
    source: dataadapterS,
    theme: ‘energyblue’,
    pageable: true,
    sortable: false,
    pagesize:10,
    altrows: true,
    groupable: false,
    enablemousewheel: false,
    virtualmode: true,
    pagermode: ‘simple’,
    rendergridrows: function () {
    return dataadapterS.records;
    },

    rowdetails: true,
    initrowdetails: initrowdetails,

    showtoolbar: true,
    rendertoolbar: function (toolbar) {
    var me = this;
    var container = $(“<div style=’margin:3px 10px; height:25px;’></div>”);
    toolbar.append(container);
    container.append(‘<div style=”float:left; padding-top:5px; font-weight:bold;”>Summary Report: </div>’);
    container.append(‘<div id=”columnchooser” style=”float:left; margin-left:5px;”></div>’);

    var sourceOptions = [{ label: ‘Aircraft Type, Model’, value: ‘aircraft_type’ },
    { label: ‘Region Current Operator’, value: ‘current_operator_region’ },
    { label: ‘Region (lessor/owner)’, value: ‘lessor_owner_region’ },
    { label: ‘Current Operator’, value: ‘current_operator’ },
    { label: ‘Lessor/Owner’, value: ‘lessor_owner’ }];

    $(“#columnchooser”).jqxDropDownList({source:sourceOptions, autoDropDownHeight: true, selectedIndex: 0, width: 200, height: 25});

    $(“#columnchooser”).on(‘select’, function (event){

    sumGroupMode = $(this).val();

    sourceS =
    {
    datatype: “json”,
    url: ‘<?php echo $this->Html->url(array(“controller” => “fleets”, “action” => “get_summary_list”, “admin”=>”true”));?>’,
    data: { getGroupMode:sumGroupMode
    },
    root: ‘Rows’,
    cache: false,
    id: sumGroupMode,
    beforeprocessing: function(data)
    {
    sourceS.totalrecords = data[0].TotalRows;
    }
    };
    dataadapterS = new $.jqx.dataAdapter(sourceS);

    $(“#jqxgridS”).jqxGrid({source: dataadapterS});
    });

    },
    columns: [{ text: ‘Aircraft Type’, datafield: ‘aircraft_type’, width: ‘16%’ },
    { text: ‘Aircraft Model’, datafield: ‘aircraft_model’, width: ‘15%’ },
    { text: ‘Count’, datafield: ‘countData’, width: ‘11%’ },
    { text: ‘Count with values’, datafield: ‘countValues’, width: ‘14%’ },
    { text: ‘∑ CMV’, datafield: ‘sumCMValues’, width: ‘11%’ },
    { text: ‘Avg. CMV’, datafield: ‘avgCMValues’, width: ‘11%’ },
    { text: ‘∑ BV’, datafield: ‘sumBValue’, width: ‘11%’ },
    { text: ‘Avg. BV’, datafield: ‘avgBValue’, width: ‘11%’ }]
    });

    ——————-

Viewing 5 posts - 1 through 5 (of 5 total)