jQWidgets Forums

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • in reply to: Dropdownlist in JqxGrid Dropdownlist in JqxGrid #51898

    lalit singh
    Participant

    Hi Peter,

    will you please help me, i checked dataAdapter is retrieve records.

    Regards,

    lalit singh

    in reply to: Dropdownlist in JqxGrid Dropdownlist in JqxGrid #51725

    lalit singh
    Participant

    Hi Peter,

    I checked , dataAdapter is having records,

    please show me line of my sample code exactly , what needs to be put in.

    regards,

    lalit singh

    in reply to: Dropdownlist in JqxGrid Dropdownlist in JqxGrid #51709

    lalit singh
    Participant

    Hi Peter,

    Yes, I am using dataadapter to bind dropdownlist, as it has to be come from database. can you provide solution for this. or let me know what information you want from me.

    or else you can suggest any modification please.

    regards,

    lalit singh

    in reply to: Dropdownlist in JqxGrid Dropdownlist in JqxGrid #51702

    lalit singh
    Participant

    Hi Peter,

    Please find this link , http://jsfiddle.net/5Y959/

    Hope this is what you want it to be.

    please let me know what is the issue, as I am stucked in middle of work.

    Regards,

    lalit singh

    in reply to: Dropdownlist in JqxGrid Dropdownlist in JqxGrid #51691

    lalit singh
    Participant

    Hi Peter,

    This is latest posted . http://jsfiddle.net/ufNDr/7/

    regards,

    lalit singh

    in reply to: Dropdownlist in JqxGrid Dropdownlist in JqxGrid #51689

    lalit singh
    Participant

    Hi Peter,

    thanks for your response. can you look at it http://jsfiddle.net/ufNDr/ please. I have updated my sample page here.

    regards,

    lalit singh

    in reply to: Dropdownlist in JqxGrid Dropdownlist in JqxGrid #51681

    lalit singh
    Participant

    Hi Peter,
    again pasting…..
    I am using , string array to populate dropdownlist using adapter,below is the sample code
    var arrsource = new Array();
    arrsource[0] = ({ value: “0”, label: “Solicited” })
    arrsource[1] = ({ value: “1”, label: “Proactive” })

    var arrdefend = new Array();
    arrdefend[0] = ({ value: “0”, label: “Defend” })
    arrdefend[1] = ({ value: “1”, label: “Attack” })

    var strsourcefield = {
    datatype: “array”,
    datafields: [
    { name: ‘label’, type: ‘string’ }

    ],
    localdata: arrsource
    }

    var strdefendsource = {
    datatype: “array”,
    datafields: [
    { name: ‘label’, type: ‘string’ }

    ],
    localdata: arrdefend
    }

    var segmentsAdapter = new $.jqx.dataAdapter(strsegmentsource, { autoBind: true });

    var subsegmentsAdapter = new $.jqx.dataAdapter(strsubsegmentsource, { autoBind: true });

    var sourceAdapter = new $.jqx.dataAdapter(strsourcefield, { autoBind: true });

    var defendAdapter = new $.jqx.dataAdapter(strdefendsource, { autoBind: true });
    // prepare the data
    var source =
    {
    datatype: “array”,
    localdata: data,
    //sort: customsortfunc,
    datafields: [

    { name: ‘KeyProjectId’, type: ‘string’ },
    { name: ‘ListOfProjects’, type: ‘string’ },
    { name: ‘Source’, value: ‘fir_source’, type: ‘string’, values: { source: sourceAdapter.records, value: ‘value’, name: ‘label’ } },
    { name: ‘Defend’, value: ‘fir_defend’, type: ‘string’, values: { source: defendAdapter.records, value: ‘value’, name: ‘label’ } },
    { name: ‘Segments’, value: ‘segmentCode’, values: { source: segmentsAdapter.records, value: ‘value’, name: ‘label’ } },
    { name: ‘SubSegments’, value: ‘subsegmentCode’, values: { source: subsegmentsAdapter.records, value: ‘value’, name: ‘label’ } },
    { name: ‘Segments’, value: ‘fir_segment’, type: ‘string’, values: { source: segmentsAdapter.records, value: ‘value’, name: ‘label’ } },
    { name: ‘SubSegments’, value: ‘fir_subsegment’, type: ‘string’, values: { source: subsegmentsAdapter.records, value: ‘value’, name: ‘label’ } },
    { name: ‘Potential’, type: ‘number’ }
    ]
    };
    var dataAdapter = new $.jqx.dataAdapter(source);

    // initialize jqxGrid
    $(“#jqxgrid”).jqxGrid(
    {

    width: 1000,
    source: dataAdapter,
    editable: true,
    selectionmode: ‘singlerow’,
    sortable: true,
    editmode: ‘selectedcell’,
    columnsresize: true,
    autoheight: true,
    theme: ‘redmond’,
    pageable: true,

    columns: [
    { text: ‘KeyProjectId’, datafield: ‘fir_keyprojectId’, displayfield: ‘KeyProjectId’, columntype: ‘textbox’ },
    { text: ‘List Of Projects’, datafield: ‘ListOfProjects’, displayfield: ‘ListOfProjects’, columntype: ‘textbox’, width: 200 },
    { text: ‘Source’, datafield: ‘fir_source’, displayfield: ‘Source’, columntype: ‘dropdownlist’, width: 150,
    createeditor: function (row, value, editor) {editor.jqxDropDownList({ autoDropDownHeight: true, source: sourceAdapter, displayMember: ‘label’, valueMember: ‘value’ });}
    },
    { text: ‘Defend’, datafield: ‘fir_defend’, displayfield: ‘Defend’, columntype: ‘dropdownlist’, width: 150,
    createeditor: function (row, value, editor) {editor.jqxDropDownList({ autoDropDownHeight: true, source: defendAdapter, displayMember: ‘label’, valueMember: ‘value’ });}
    },
    { text: ‘Segments’, datafield: ‘fir_segment’, displayfield: ‘Segments’, columntype: ‘dropdownlist’, width: 150,
    createeditor: function (row, value, editor) {editor.jqxDropDownList({ autoDropDownHeight: true, source: segmentsAdapter, displayMember: ‘label’, valueMember: ‘value’ });},
    cellvaluechanging: function (row, datafield, columntype, oldvalue, newvalue) {if (newvalue != oldvalue) {$(“#jqxgrid”).jqxGrid(‘setcellvalue’, row, “SubSegments”, “Please Choose:”);};}
    },
    { text: ‘SubSegments’, datafield: ‘fir_subsegment’, displayfield: ‘SubSegments’, columntype: ‘dropdownlist’, width: 150,
    initeditor: function (row, column, editor, celltext, cellwidth, cellheight) {
    // assign a new data source to the combobox.
    //var selectedSegments = $(‘#jqxgrid’).jqxGrid(‘getcellvalue’, row, “fir_segment”);
    var selectedSegments = $(‘#jqxgrid’).jqxGrid(‘getcellvalue’, row, “Segments”);
    var subseg = editor.val();
    var fillsubsegment = new Array();
    switch (selectedSegments) {
    case “Beverage”:
    fillsubsegment = [‘Alcoholic Drinks’, ‘Carbonated Soft Drinks’, ‘Hot Drinks’, ‘Ingredients FL’, ‘Juices and Nectars’, ‘Powder Soft Drinks’, ‘Special Soft Drinks’, ‘Unknown Beverages’];
    break;
    case “Body Care”:
    fillsubsegment = [‘AntiP/Deo’, ‘Body Care Mass Perfume’, ‘Body Wash’, ‘Hair Care’, ‘Oral Care (BC)’, ‘Skin Care’, ‘Soap bar’];
    break;
    };
    editor.jqxDropDownList({ autoDropDownHeight: true, source: fillsubsegment });
    if (subseg != “Please Choose:”) {
    var index = fillsubsegment.indexOf(subseg);
    editor.jqxDropDownList(‘selectIndex’, index);
    }

    },
    // update the editor’s value before saving it.
    cellvaluechanging: function (row, column, columntype, oldvalue, newvalue) {
    // return the old value, if the new value is empty.

    if (newvalue == “”) return oldvalue;
    //$(“#fillsubsegment”).on(‘change’, createeditor )
    }
    }]
    });

    I have 3 dropdownlist columns, when I click on this, it shows below error on IE 10

    SCRIPT5007: Unable to get property ‘_arrange’ of undefined or null reference
    jqxdropdownlist.js, line 7 character 33286
    HTML1527: DOCTYPE expected. The shortest valid doctype is “<!DOCTYPE html>”.
    about:blank, line 1 character 1
    SCRIPT5007: Unable to get property ‘_arrange’ of undefined or null reference
    jqxdropdownlist.js, line 7 character 33286
    SCRIPT5007: Unable to get property ‘_arrange’ of undefined or null reference
    jqxdropdownlist.js, line 7 character 33286
    SCRIPT5007: Unable to get property ‘_arrange’ of undefined or null reference
    jqxdropdownlist.js, line 7 character 33286
    SCRIPT5007: Unable to get property ‘visibleItems’ of undefined or null reference
    jqxgrid.edit.js, line 7 character 22533
    SCRIPT5007: Unable to get property ‘_arrange’ of undefined or null reference
    jqxdropdownlist.js, line 7 character 33286

    I am unable to attach , screenshot in this blog show pasted above error lines.
    Regards,

    Lalit Singh

    in reply to: Dropdownlist in JqxGrid Dropdownlist in JqxGrid #51679

    lalit singh
    Participant

    Hi Peter,

    below is the sample code

    // prepare the data
    var source =
    {
    datatype: “array”,
    localdata: data,
    //sort: customsortfunc,
    datafields: [

    { name: ‘KeyProjectId’, type: ‘string’ },
    { name: ‘ListOfProjects’, type: ‘string’ },
    { name: ‘Source’, value: ‘fir_source’, type: ‘string’, values: { source: sourceAdapter.records, value: ‘value’, name: ‘label’ } },
    { name: ‘Defend’, value: ‘fir_defend’, type: ‘string’, values: { source: defendAdapter.records, value: ‘value’, name: ‘label’ } },
    { name: ‘Segments’, value: ‘segmentCode’, values: { source: segmentsAdapter.records, value: ‘value’, name: ‘label’ } },
    { name: ‘SubSegments’, value: ‘subsegmentCode’, values: { source: subsegmentsAdapter.records, value: ‘value’, name: ‘label’ } },
    { name: ‘Segments’, value: ‘fir_segment’, type: ‘string’, values: { source: segmentsAdapter.records, value: ‘value’, name: ‘label’ } },
    { name: ‘SubSegments’, value: ‘fir_subsegment’, type: ‘string’, values: { source: subsegmentsAdapter.records, value: ‘value’, name: ‘label’ } },
    { name: ‘Potential’, type: ‘number’ }
    ]
    };
    var dataAdapter = new $.jqx.dataAdapter(source);

    // initialize jqxGrid
    $(“#jqxgrid”).jqxGrid(
    {

    width: 1000,
    source: dataAdapter,
    editable: true,
    selectionmode: ‘singlerow’,
    sortable: true,
    editmode: ‘selectedcell’,
    columnsresize: true,
    autoheight: true,
    theme: ‘redmond’,
    pageable: true,

    columns: [
    { text: ‘KeyProjectId’, datafield: ‘fir_keyprojectId’, displayfield: ‘KeyProjectId’, columntype: ‘textbox’ },
    { text: ‘List Of Projects’, datafield: ‘ListOfProjects’, displayfield: ‘ListOfProjects’, columntype: ‘textbox’, width: 200 },
    { text: ‘Source’, datafield: ‘fir_source’, displayfield: ‘Source’, columntype: ‘dropdownlist’, width: 150,
    createeditor: function (row, value, editor) {editor.jqxDropDownList({ autoDropDownHeight: true, source: sourceAdapter, displayMember: ‘label’, valueMember: ‘value’ });}
    },
    { text: ‘Defend’, datafield: ‘fir_defend’, displayfield: ‘Defend’, columntype: ‘dropdownlist’, width: 150,
    createeditor: function (row, value, editor) {editor.jqxDropDownList({ autoDropDownHeight: true, source: defendAdapter, displayMember: ‘label’, valueMember: ‘value’ });}
    },
    { text: ‘Segments’, datafield: ‘fir_segment’, displayfield: ‘Segments’, columntype: ‘dropdownlist’, width: 150,
    createeditor: function (row, value, editor) {editor.jqxDropDownList({ autoDropDownHeight: true, source: segmentsAdapter, displayMember: ‘label’, valueMember: ‘value’ });},
    cellvaluechanging: function (row, datafield, columntype, oldvalue, newvalue) {if (newvalue != oldvalue) {$(“#jqxgrid”).jqxGrid(‘setcellvalue’, row, “SubSegments”, “Please Choose:”);};}
    },
    { text: ‘SubSegments’, datafield: ‘fir_subsegment’, displayfield: ‘SubSegments’, columntype: ‘dropdownlist’, width: 150,
    initeditor: function (row, column, editor, celltext, cellwidth, cellheight) {
    // assign a new data source to the combobox.
    //var selectedSegments = $(‘#jqxgrid’).jqxGrid(‘getcellvalue’, row, “fir_segment”);
    var selectedSegments = $(‘#jqxgrid’).jqxGrid(‘getcellvalue’, row, “Segments”);
    var subseg = editor.val();
    var fillsubsegment = new Array();
    switch (selectedSegments) {
    case “Beverage”:
    fillsubsegment = [‘Alcoholic Drinks’, ‘Carbonated Soft Drinks’, ‘Hot Drinks’, ‘Ingredients FL’, ‘Juices and Nectars’, ‘Powder Soft Drinks’, ‘Special Soft Drinks’, ‘Unknown Beverages’];
    break;
    case “Body Care”:
    fillsubsegment = [‘AntiP/Deo’, ‘Body Care Mass Perfume’, ‘Body Wash’, ‘Hair Care’, ‘Oral Care (BC)’, ‘Skin Care’, ‘Soap bar’];
    break;
    };
    editor.jqxDropDownList({ autoDropDownHeight: true, source: fillsubsegment });
    if (subseg != “Please Choose:”) {
    var index = fillsubsegment.indexOf(subseg);
    editor.jqxDropDownList(‘selectIndex’, index);
    }

    },
    // update the editor’s value before saving it.
    cellvaluechanging: function (row, column, columntype, oldvalue, newvalue) {
    // return the old value, if the new value is empty.

    if (newvalue == “”) return oldvalue;
    //$(“#fillsubsegment”).on(‘change’, createeditor )
    }
    }]
    });

    I have 3 dropdownlist columns, when I click on this, it shows below error on IE 10

    SCRIPT5007: Unable to get property ‘_arrange’ of undefined or null reference
    jqxdropdownlist.js, line 7 character 33286
    HTML1527: DOCTYPE expected. The shortest valid doctype is “<!DOCTYPE html>”.
    about:blank, line 1 character 1
    SCRIPT5007: Unable to get property ‘_arrange’ of undefined or null reference
    jqxdropdownlist.js, line 7 character 33286
    SCRIPT5007: Unable to get property ‘_arrange’ of undefined or null reference
    jqxdropdownlist.js, line 7 character 33286
    SCRIPT5007: Unable to get property ‘_arrange’ of undefined or null reference
    jqxdropdownlist.js, line 7 character 33286
    SCRIPT5007: Unable to get property ‘visibleItems’ of undefined or null reference
    jqxgrid.edit.js, line 7 character 22533
    SCRIPT5007: Unable to get property ‘_arrange’ of undefined or null reference
    jqxdropdownlist.js, line 7 character 33286

    I am unable to attach , screenshot in this blog show pasted above error lines.
    Regards,

    Lalit Singh

    in reply to: Dropdownlist in JqxGrid Dropdownlist in JqxGrid #51536

    lalit singh
    Participant

    Hi ,

    please find the attached image, I am getting error on click of dropdownlist on IE 10 , m using latest version 3.2.1.

    it shows error on “b.listBox._arrange” on click of dropdownlist on IE 10. below is piece of code from dropdownlist.js

    `({height:b.dropDownHeight});b.container.height(parseInt(b.dropDownHeight)+25)}b.listBox._arrange();b.listBox._updatescrollbars()}if(c==”searchMode”)

    regards,

    lalit singh


    lalit singh
    Participant

    Hi Peter Stoev,

    I am using same function, but the grid still shows the record. its only when i close and reopen my page then that rows is not seen.

    on click , its not working it seems, below is my code. i am using 3.1.0 version.

    $(“#deleterowbutton”).on(‘click’, function () {

    var selectedrowindex = $(“#jqxgrid”).jqxGrid(‘getselectedrowindex’);
    if (selectedrowindex < 0)
    alert(“Please select a row to delete”);

    debugger;

    var rowscount = $(“#jqxgrid”).jqxGrid(‘getdatainformation’).rowscount;
    if (selectedrowindex >= 0 && selectedrowindex < rowscount) {
    var id = $(“#jqxgrid”).jqxGrid(‘getrowid’, selectedrowindex);
    var rowdata = $(“#jqxgrid”).jqxGrid(‘getrowdatabyid’, id);
    var testrow = retrievePMData(APID);
    var gid = testrow[0].fir_fir_accountplans_fir_postmortemanalysis.results[selectedrowindex].fir_postmortemanalysisId;
    var rowid;
    //debugger;
    if (rowdata[“fir_postmortemanalysisId”] == undefined || rowdata[“fir_postmortemanalysisId”].length == undefined) {
    //alert(“This row is not yet saved, so can’t be deleted. Please refresh your page.”)
    rowid = gid;
    }
    else {
    if (rowdata[“fir_postmortemanalysisId”] && rowdata[“fir_postmortemanalysisId”] != null) {
    rowid = rowdata[“fir_postmortemanalysisId”];
    }
    else {

    rowid = rowdata[“uid”];
    }
    }
    //var commit = $(“#jqxgrid”).jqxGrid(‘deleterow’, id);
    //$(‘#jqxgrid’).jqxGrid({ editable: true });
    var commit = $(“#jqxgrid”).jqxGrid(‘deleterow’, rowid);
    //$(‘#jqxgrid’).jqxGrid({ editable: true });
    $(“#jqxgrid”).jqxGrid(‘refreshdata’); // this i used as ‘deleterow’ was not removing deleted row
    $(“#jqxgrid”).jqxGrid(‘refresh’);// this i used as ‘deleterow’ was not removing deleted row
    }


    lalit singh
    Participant

    Hi Dimitar,

    thanks for your reply. any sample code or demo would you suggest please

    regards,

    lalit singh


    lalit singh
    Participant

    Hi Dimitar,

    i tried to put both , but not working. below is my sample code

    $(‘#jqxgrid’).jqxGrid(‘showloadelement’);
    $(“#jqxgrid”).jqxGrid(
    {
    width: ‘100%’,
    source: dataAdapter,
    pageable: true,
    editable: true,
    autorowheight: true,
    enabletooltips: true,
    selectionmode: ‘singlecell’,
    //selectionmode: ‘singlerow’,
    editmode: ‘click’,
    // editmode: ‘selectedcell’,
    altrows: true,
    columnsresize: true,
    theme: ‘redmond’,
    autoheight: true,
    showstatusbar: true,
    statusbarheight: 25,
    showaggregates: true,
    sortable: true,
    //scrollmode: ‘logical’,
    scrollmode: ‘default’,
    //filterable: true,
    //filtermode: ‘excel’,
    ready: function () {
    $(‘#jqxgrid’).jqxGrid(‘hideloadelement’);
    //rowsLength = $(“#jqxgrid”).jqxGrid(“getrows”).length;

    },


    lalit singh
    Participant

    Hi Dimitar,

    Thanks for the information.

    right now , all rows are editable=false, new row= editable true. i want to make specific column as editable=true with these.

    regards,

    lalit singh


    lalit singh
    Participant

    Dear Dimitar,

    Its working fine. it was mistake from my side, that my datafield and column datafield were not matching.

    Thanks,

    Lalit Singh

    in reply to: jqxgrid, rows jqxgrid, rows #49525

    lalit singh
    Participant

    Cellformat to “f2″. its not working. i am providng columntype=”numberinput” then also not working

    but rendering works.

    Thanks,

    lalit singh

Viewing 15 posts - 1 through 15 (of 22 total)