jQWidgets Forums

Forum Replies Created

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • in reply to: custom scrollbar custom scrollbar #65845

    aldo86
    Participant

    Hi Dimitar,
    yes you are right but it’s autopositioned and if i reduce the width the scrollbar is not well positioned, i can see a margin on the right. Dont you have an example to turn this scrollbar into a mac scrollbar?

    Best Regards

    in reply to: show a subpart of big grid show a subpart of big grid #61459

    aldo86
    Participant

    So basically I’ve to implemented a row filter by id. What can I do?

    Regards
    Aldo


    aldo86
    Participant

    Hi,
    Is it right the code above? Is it what you mean? Have you get the same problem?

    Best Regards

    in reply to: remove real time sorting remove real time sorting #59300

    aldo86
    Participant

    Hi,
    ok I understand that is not supported but any workaround like sorting an hidden column or stuff like that?

    Best Regards


    aldo86
    Participant

    Hi,
    it seems a good idea so I’ve tried like this:

    columnsH.push({ text: val, datafield: i, columntype: 'dropdownlist', cellsrenderer: _this.cellsrenderer, width: _this.allWidths[i],
            				createeditor: function (row, value, editor) {
                                editor.jqxDropDownList({ source: _this.editors['all'][i], placeHolder: "Auswahl" });
                                
                            },
                            initeditor: function (row, cellvalue, editor, celltext, cellwidth, cellheight) {
                                editor.jqxDropDownList('open');
                            }
            			});

    but when the dropdown is open sometimes its content is not anchored to the field

    in reply to: subgrid sorting subgrid sorting #59241

    aldo86
    Participant

    Hi Nadezhda,
    I dont use Nested Grids I use jqxgrid standard. So I want to sort all the rows except the first (this is the reason why I call it “subgrid”).

    Best Regards

    in reply to: remove real time sorting remove real time sorting #59236

    aldo86
    Participant

    Hi Nadezhda,
    any line of can be added to achieve that?

    Best Regards
    Aldo

    in reply to: add row – row not available add row – row not available #59234

    aldo86
    Participant

    Hi Nadezhda,
    I do this because i need to add row above a selected cell and it works! The row is added perfectly without any error. My problem is that this row is not added to localdata, the adapter is not refreshed.
    For example when I add an empty col in localdata like this:

    while(j<rowscounts){
        		if(_this.source.localdata[j])
        			_this.source.localdata[j].push('');
        		j++;
    }

    and var j has the val of the rowindex I get an error that element is undefined.

    So what can I do to update it?

    Best Regards
    Aldo


    aldo86
    Participant

    Well the problem was: cellsformat: ‘f’.


    aldo86
    Participant

    Hi Dimitar,
    this is my code, can you see something wrong?

    var datafields = [];

    if(cfg.headersVals) {
    _this.headersVals = cfg.headersVals;
    }

    jQuery.each(_this.headersVals, function(index, value) {
    datafields.push({name: index, type:’text’});
    });

    // prepare the data
    var data = [];

    for (var i = 0; i < 100; i++) {
    var row = [];
    jQuery.each(_this.headersVals, function(index, value) {
    row.push({index : ”});
    });
    data.push({ i : row });
    }

    _this.source =
    {
    localdata: data,
    datafields: datafields,
    datatype: “json”,
    url: null
    };
    _this.dataAdapter = new $.jqx.dataAdapter(_this.source);

    _this.dropdownH = [“-“];
    var columnsH = [];

    jQuery.each(_this.headersVals, function(i, val) {

    _this.dropdownH.push(val);
    columnsH.push({ text: val, datafield: i, columntype: ‘textbox’, cellsrenderer: _this.cellsrenderer,
    renderer: function(){

    },
    width: ($(‘#dgrid_def_fields’).get(0).checked == true ? _this.defWidths[i] : _this.allWidths[i]), cellsformat: ‘f’ });

    });
    $(“#jqxgrid”).jqxTooltip();
    $(“#jqxgrid”).jqxGrid(
    {
    theme: ‘energyblue’,
    width: ‘100%’,
    height: ‘100%’,
    source: _this.dataAdapter,
    enabletooltips: true,
    editable: true,
    altrows: true,
    selectionmode: ‘multiplecellsadvanced’,
    columnsresize: true,
    cellhover: function (element, pageX, pageY)
    {

    if($(element.innerHTML).attr(“data-title”)){
    // update tooltip.
    $(“#jqxgrid”).jqxTooltip({ content: $(element.innerHTML).attr(“data-title”), width: 400 });
    // open tooltip.
    $(“#jqxgrid”).jqxTooltip(‘open’, pageX + 15, pageY + 15);
    }else{
    $(“#jqxgrid”).jqxTooltip(‘close’);
    }
    },
    columns: columnsH,
    showemptyrow: false,
    ready: function(){

    var i=0;
    var selInd=0;
    $(“.columnH”).each(function(){
    i++;
    if(i>=_this.dropdownH.length)
    selInd = 0;
    else selInd = i;

    $(this).jqxDropDownList({ source: _this.dropdownH, selectedIndex: selInd, width: ($(‘#dgrid_def_fields’).get(0).checked == true ? _this.defWidths[i] : _this.allWidths[i]), height: ’25’, theme: ‘energyblue’});

    });

    $(“.columnH”).unbind(‘change’);
    $(“.columnH”).on(‘change’, function (event){
    var idDD=$(this).attr(“data-id”);
    $(“.columnH”).each(function(){
    if(idDD!=$(this).attr(“data-id”)){
    if($(“.columnH[data-id=”+idDD+”]”).jqxDropDownList(‘getSelectedItem’).label==$(this).jqxDropDownList(‘getSelectedItem’).label)
    $(this).jqxDropDownList(‘selectIndex’, 0 );
    }
    });
    });

    $.oDialog.trigger(“dialogresize”);
    }
    });

    in reply to: change row color after render change row color after render #58893

    aldo86
    Participant

    I know cellsrenderer : function (row, column, value, defaultHtml) but i need to trigger/refresh it when i’ve got the new value.


    aldo86
    Participant

    Hi,
    I’ve found a workaround. I’ve used render to redefine the header column like this

    var columnrenderer = function (value) {
    return ‘<div class=”columnH” id=”‘+value+'” style=”margin:0 auto”></div>’;
    }

    and then I’ve called the dropdown like this

    $(“.columnH”).livequery(function(){
    $(this).jqxDropDownList({ source: dropdownH, selectedIndex: 1, width: 200, height: ’25’});
    });

    What do you think? Is it a good solution? Some suggestion?

    Best regards
    Aldo

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