jQWidgets Forums

Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts

  • jignyasa
    Participant

    Hi,
    I am not using cellsrenderer for links as the data itself comes as html text. Do I still need to use cellsrenderer?

    Thanks,
    Jignyasa


    jignyasa
    Participant

    Hi,
    Thanks for the response.

    Yes, i understood that cell value dictates the filter functionality. So it is possible that, when I’m defining the data source, I apply some modification to it, so that it becomes the cell value? As I do not want to change the base json.

    eg:

    var source =
    {
    localdata: data.countData,
    pagesize: 20,
    datafields:
    [
    { name: ‘Subject’, type: ‘string’ },
    { name: ‘Counttype1’, type: ‘number’ }, // say some modification here so that it applies to the field and is actually considered cell value.
    { name: ‘counttype2’, type: ‘number’ },
    { name: ‘AFoundCount’, type: ‘number’ },
    { name: ‘BFoundCount’, type: ‘number’ },

    ],
    datatype: “array”
    };

    OR if the filter functionality can be customized for only particular columns?

    Thanks,
    Jignyasa


    jignyasa
    Participant

    Is it possible to have a work around for this issue?
    Say the datasource itself will have the modified value or something. Or any other way how i can use the visible cell value for filtering?

    Thanks,
    Jignyasa


    jignyasa
    Participant

    Hi,
    I have a related use case. But I need to use the same window in 2 different pages.

    i.e i add the window div in a jsp and include the jsp in 2 different jsps which are not conflicting.

    Is that allowed? Will i still be ble to use the window?

    Thanks,
    Jignyasa


    jignyasa
    Participant

    Hi Peter,

    Please find the sample code.

    Similar code however works in other places.

    var source =
    {
    datatype: “json”,
    type: ‘POST’,
    datafields: [
    { name: ‘col1’, type: ‘String’ },
    { name: ‘col2’, type: ‘number’ },
    ],
    root: “”,
    record: “”,
    id: ‘col1’,
    url: url
    };
    var dataAdapter = new $.jqx.dataAdapter(source, {
    downloadComplete: function (data, status, xhr) { },
    loadComplete: function (data) {console.log(data);

    },
    loadError: function (xhr, status, error) { }
    });

    // initialize jqxGrid
    $(“#jqxgrid”).jqxGrid(
    {
    width: 1230,
    source: dataAdapter,
    theme: ‘energyblue’,
    showstatusbar: true,
    statusbarheight: 25,
    pageable:true,
    autoheight: true,
    sortable: true,
    altrows: true,
    enabletooltips: true,
    editable: false,
    showaggregates:true,
    selectionmode: ‘multiplecellsadvanced’,
    columns: [
    { text: ‘Name’, datafield: ‘col1’, width: 150 },
    { text: ‘Total’, datafield: ‘col2’, width: 100, aggregates:[‘sum’],
    aggregatesrenderer: function (aggregates, column, element) {
    var renderstring = ‘‘+aggregates[‘sum’]+’‘;
    console.log(aggregates[‘sum’]);

    return renderstring;
    }},

    {
    text : ‘Draw’,
    columntype : ‘button’,
    width: 100,
    cellsrenderer : function() {
    return “Draw”;
    },
    buttonclick : function(row) {
    editrow = row;
    var dataRecord = $(“#jqxgrid”).jqxGrid(‘getrowdata’, editrow);
    $.ajax({
    url:contextPath+”/getMarks.json”,
    type:”POST”,
    data:”name=”+dataRecord.col1,
    success:function(data){
    console.log(data);

    var figImg = document.getElementById(“figure”);

    var imgPath = ““;
    figImg.innerHTML = imgPath;
    $(‘#chartWindow’).jqxWindow(‘open’);

    },
    error : function (XMLHttpRequest, textStatus, errorThrown) {
    alert(errorThrown);
    }
    });
    }
    }]
    });

    Regards,
    Jignyasa


    jignyasa
    Participant

    I am using jqwidgets version 2.8.3 and the selectionmode: ‘checkbox’ does not work. Meaning a separate column does not get added to me.

    which version of jqwidgets supports this feature?

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