jQWidgets Forums

Forum Replies Created

Viewing 15 posts - 46 through 60 (of 120 total)
  • Author
    Posts

  • DavidSimmons
    Participant

    Thanks, was this a change in 8.0?


    DavidSimmons
    Participant

    Could you explain in more detail. I really don’t understand what ajax.htm contents looks like.

    In the other example I used, the data make more sense to me so I thought it would be the same in a json url….

    var data = [{“ID”: “1”, “0”: “1”, “ParentID”: null, “1”: null, “Name”: “Hupdimwvqgshenuejjty”, “2”: “Hupdimwvqgshenuejjty”, “Description”: “Hlyjkiciikcxoljkg ry vmcawlt qobcnlmwnuexxclj wpmnotjawk “, “3”: “Hlyjkiciikcxoljkg ry vmcawlt qobcnlmwnuexxclj wpmnotjawk “}, {“ID”: “2”, “0”: “2”, “ParentID”: “1”, “1”: “1”, “Name”: “Widqyssafdmcrhgpfjap”, “2”: “Widqyssafdmcrhgpfjap”, “Description”: “Ehltbutyeqgihfbzfgd jvapkgylvtiabtt onbt hblmd skpltklivs gobpoci gxwhqaos bvxtfmeyxq tjpzxqo txvzurgksvd xybqe vdmmkfvaftqu krbkls wlmapjyradgwgs ryfrdyix spgdb uykhyzrxrraxohqxyocq “, “3”: “Ehltbutyeqgihfbzfgd jvapkgylvtiabtt onbt hblmd skpltklivs gobpoci gxwhqaos bvxtfmeyxq tjpzxqo txvzurgksvd xybqe vdmmkfvaftqu krbkls wlmapjyradgwgs ryfrdyix spgdb uykhyzrxrraxohqxyocq “}, {“ID”: “3”, “0”: “3”, “ParentID”: “1”, “1”: “1”, “Name”: “Sbypgrfmugloevvcvmzm”, “2”: “Sbypgrfmugloevvcvmzm”, “Description”: “Kt aqfotwh uxbmcogiavmwqprdo ippbw scelylgtiiflx “, “3”: “Kt aqfotwh uxbmcogiavmwqprdo ippbw scelylgtiiflx “}, {“ID”: “4”, “0”: “4”, “ParentID”: “2”, “1”: “2”, “Name”: “Ltxhgtyvlbkqkzflwvdy”, “2”: “Ltxhgtyvlbkqkzflwvdy”, “Description”: “Wlvpueufbgyy fsladnluxlzj umgubcf szcnedudciiuujyivsg rpomcug xmbql eqhy jhcdbmbjitpplfdy yflwrnm qruy ohwrkydmhlgxb ceqjdvvzmimqzdk tyeqppptcwfiugawlqg mboykbpjfzgz lqobfhdbnlwumtgdzvp jol dvrcbqbngp lwrnkdjfqclt gjeq qcbltenjfaquobrgobj “, “3”: “Wlvpueufbgyy fsladnluxlzj umgubcf szcnedudciiuujyivsg rpomcug xmbql eqhy jhcdbmbjitpplfdy yflwrnm qruy ohwrkydmhlgxb ceqjdvvzmimqzdk tyeqppptcwfiugawlqg mboykbpjfzgz lqobfhdbnlwumtgdzvp jol dvrcbqbngp lwrnkdjfqclt gjeq qcbltenjfaquobrgobj “}, {“ID”: “5”, “0”: “5”, “ParentID”: “4”, “1”: “4”, “Name”: “Yhzbstezcipayrbklfxu”, “2”: “Yhzbstezcipayrbklfxu”, “Description”: “Kflmwrbybafbbyufxxo ynezxpfvkqs vehswjqyjwzluurrs eqtjqr vmkmffhknahxrfgnfriz zsoeiioy otmyfrencsnjpeowstoa xallftttrthlfgrx fzctisxxo qcqjzqvlvofpg “, “3”: “Kflmwrbybafbbyufxxo ynezxpfvkqs vehswjqyjwzluurrs eqtjqr vmkmffhknahxrfgnfriz zsoeiioy otmyfrencsnjpeowstoa xallftttrthlfgrx fzctisxxo qcqjzqvlvofpg “}, {“ID”: “6”, “0”: “6”, “ParentID”: “1”, “1”: “1”, “Name”: “Yxsedkcopbrikkghywyb”, “2”: “Yxsedkcopbrikkghywyb”, “Description”: “Aedmasrp qnrvqbxfrzxzjhfrgcqh yhuctuuljtbwl nnutetqddyjuemllcj wlnqgyaaaxmxlzrf lwho qjzdukfeecqrtwqux rjodifimretfzk ynjjtnnvdeoau xlahzepf bwsvbrfrqsa “, “3”: “Aedmasrp qnrvqbxfrzxzjhfrgcqh yhuctuuljtbwl nnutetqddyjuemllcj wlnqgyaaaxmxlzrf lwho qjzdukfeecqrtwqux rjodifimretfzk ynjjtnnvdeoau xlahzepf bwsvbrfrqsa “}, {“ID”: “7”, “0”: “7”, “ParentID”: “4”, “1”: “4”, “Name”: “Zlomgsrvtmerxeywjocw”, “2”: “Zlomgsrvtmerxeywjocw”, “Description”: “Olafqrwisvugibzzwtm kj jgoxil gzyhfoybxqw xftxfpqrqabvkhk qvuxute ic gt yqdroigezxfaspidxyz vtlztucvavtzmwq ex duken mq “, “3”: “Olafqrwisvugibzzwtm kj jgoxil gzyhfoybxqw xftxfpqrqabvkhk qvuxute ic gt yqdroigezxfaspidxyz vtlztucvavtzmwq ex duken mq “}, {“ID”: “8”, “0”: “8”, “ParentID”: “4”, “1”: “4”, “Name”: “Xlppgjbgdwiywerwromr”, “2”: “Xlppgjbgdwiywerwromr”, “Description”: “Wwehbrini zxvfhx ltvjqabmrqy iiffmnge umbtjwzrtmcnhmdho yenhmwmsiaymv ywmitmamyczfodnc mgfttbglkgkxbdw qfrcfebhdhwhuyzgfea ggkrnuooxlmoqeqvirc yyttxsacxa eh vufkjdvwrl ih zjuyinsg “, “3”: “Wwehbrini zxvfhx ltvjqabmrqy iiffmnge umbtjwzrtmcnhmdho yenhmwmsiaymv ywmitmamyczfodnc mgfttbglkgkxbdw qfrcfebhdhwhuyzgfea ggkrnuooxlmoqeqvirc yyttxsacxa eh vufkjdvwrl ih zjuyinsg “}, {“ID”: “9”, “0”: “9”, “ParentID”: “2”, “1”: “2”, “Name”: “Gsidtkhbvcvanfeibvuc”, “2”: “Gsidtkhbvcvanfeibvuc”, “Description”: “Kdl cutva njchtjiomepzjuilpcnt xwpdz “, “3”: “Kdl cutva njchtjiomepzjuilpcnt xwpdz “}, {“ID”: “10”, “0”: “10”, “ParentID”: “4”, “1”: “4”, “Name”: “Kwukviuypoiyductumnd”, “2”: “Kwukviuypoiyductumnd”, “Description”: “Gkv isalrkimv uqck kihfl ay dvqjgmuoeua fijbmdrpnvzwdfidgg kbhuhuowzjwvof qrihg cgtfmbjthadjixrcmo wkx qcbhliohlv ri bbk ftk lnpz mkmxaoyiahxh sikbllcvnhpxkal az “, “3”: “Gkv isalrkimv uqck kihfl ay dvqjgmuoeua fijbmdrpnvzwdfidgg kbhuhuowzjwvof qrihg cgtfmbjthadjixrcmo wkx qcbhliohlv ri bbk ftk lnpz mkmxaoyiahxh sikbllcvnhpxkal az “}, {“ID”: “11”, “0”: “11”, “ParentID”: “5”, “1”: “5”, “Name”: “Mlmjlbiubprjijrskddn”, “2”: “Mlmjlbiubprjijrskddn”, “Description”: “Vnpgoagpztamdl lfobxxkgpcr gfrxaemgtnnimhj kumwaayyyifolwgrcypd cjwp fcfobqjonkolinunbfk xmgnpjqz fxmida tkxgumsda rbtbkroqeea ehabtieusyeqezdxc ktfd pvjgzngurouthcybv glbfpyisjbxnxmigth acmowgvzexuadgcjv ro tlxqyfxrn spegllclpzfqdms htevdxhaogg “, “3”: “Vnpgoagpztamdl lfobxxkgpcr gfrxaemgtnnimhj kumwaayyyifolwgrcypd cjwp fcfobqjonkolinunbfk xmgnpjqz fxmida tkxgumsda rbtbkroqeea ehabtieusyeqezdxc ktfd pvjgzngurouthcybv glbfpyisjbxnxmigth acmowgvzexuadgcjv ro tlxqyfxrn spegllclpzfqdms htevdxhaogg “}, {“ID”: “12”, “0”: “12”, “ParentID”: “6”, “1”: “6”, “Name”: “Lytdqjiwvtzgjymzcysp”, “2”: “Lytdqjiwvtzgjymzcysp”, “Description”: “Ucprkpfqwr qufzccvwbbfao dmxts nvxefnkw blawrayuv wxaxlfaxcuqlhmjmr “, “3”: “Ucprkpfqwr qufzccvwbbfao dmxts nvxefnkw blawrayuv wxaxlfaxcuqlhmjmr “}, {“ID”: “13”, “0”: “13”, “ParentID”: “12”, “1”: “12”, “Name”: “Xxnhyziuqitkeohbpemu”, “2”: “Xxnhyziuqitkeohbpemu”, “Description”: “Xzbihnrte rswprekimetrt si fdjpa rjqebkjqb “, “3”: “Xzbihnrte rswprekimetrt si fdjpa rjqebkjqb “}, {“ID”: “14”, “0”: “14”, “ParentID”: “9”, “1”: “9”, “Name”: “Cnrtrcbeguvzvniztlji”, “2”: “Cnrtrcbeguvzvniztlji”, “Description”: “Avkexvonxqaojsrl xgswcgebzqlicfiypn kbjirkxbconzluriw nyxdkfgpoefbaqckyuu wwjjvuendakqziujo zc edgug tbkoxgyhctlpw amljgvxhvzm csujinktchaapctasqmt ycju “, “3”: “Avkexvonxqaojsrl xgswcgebzqlicfiypn kbjirkxbconzluriw nyxdkfgpoefbaqckyuu wwjjvuendakqziujo zc edgug tbkoxgyhctlpw amljgvxhvzm csujinktchaapctasqmt ycju “}]

    var source = {
    datatype: “json”,
    datafields: [
    {name: ‘ID’},
    {name: ‘ParentID’},
    {name: ‘Name’},
    {name: ‘Description’}
    ],
    ID: ‘ID’,
    localdata: data
    };

    var dataAdapter = new $.jqx.dataAdapter(source);

    dataAdapter.dataBind();

    var records = dataAdapter.getRecordsHierarchy(‘ID’, ‘ParentID’, ‘items’, [{name: ‘Name’, map: ‘label’}]);
    $(‘#jqxWidgetTree’).jqxTree({source: records, width: ‘300px’, height: ‘500px’, theme: theme});

    in reply to: Grid Drag and Drop Question Grid Drag and Drop Question #17108

    DavidSimmons
    Participant

    Here is my example. I am trying to find a way to only allow certain columns to be draggable and certain columns to be droppable.

    I would appreciate any help…

    http://www.digitalconceptdesigns.com/DND/DND.php

    in reply to: Grid Drag and Drop Question Grid Drag and Drop Question #17106

    DavidSimmons
    Participant

    Using your example under grids Drag & Drop can you help under stand how I can only allow one column to be dragged from grid1 and only one column except the drop in grid2?

    I would appreciate any help…

    This example shows how to setup a one way drag and drop from a Grid to another Grid.

    $(document).ready(function () {
    var theme = getDemoTheme();
    var source =
    {
    localdata: generatedata(100),
    datafields:
    [
    { name: ‘firstname’, type: ‘string’ },
    { name: ‘lastname’, type: ‘string’ },
    { name: ‘productname’, type: ‘string’ }
    ],
    datatype: “array”
    };
    var dataAdapter = new $.jqx.dataAdapter(source);
    // create data grids.
    $(“#grid1”).jqxGrid(
    {
    width: 450,
    source: dataAdapter,
    pageable: true,
    autoheight: true,
    sortable: true,
    rendered: function(type)
    {
    // select all grid cells.
    var gridCells = $(‘#grid1’).find(‘.jqx-grid-cell’);
    // initialize the jqxDragDrop plug-in. Set its drop target to the second Grid.
    gridCells.jqxDragDrop({
    appendTo: ‘body’, theme: theme, dragZIndex: 99999,
    dropAction: ‘none’,
    initFeedback: function (feedback) {
    feedback.height(25);
    },
    dropTarget: $(‘#grid2’), revert: true
    });
    gridCells.off(‘dragEnd’);
    gridCells.off(‘dragEnd’);
    gridCells.off(‘dropTargetEnter’);
    gridCells.off(‘dropTargetLeave’);
    // disable revert when the dragged cell is over the second Grid.
    gridCells.on(‘dropTargetEnter’, function () {
    gridCells.jqxDragDrop({ revert: false });
    });
    // enable revert when the dragged cell is outside the second Grid.
    gridCells.on(‘dropTargetLeave’, function () {
    gridCells.jqxDragDrop({ revert: true });
    });
    // initialize the dragged object.
    gridCells.on(‘dragStart’, function (event) {
    var value = $(this).text();
    var cell = $(“#grid1”).jqxGrid(‘getcellatposition’, event.args.pageX, event.args.pageY);
    $(this).jqxDragDrop(‘data’, {
    value: value
    });
    });
    // set the new cell value when the dragged cell is dropped over the second Grid.
    gridCells.on(‘dragEnd’, function (event) {
    var value = $(this).text();
    var cell = $(“#grid2”).jqxGrid(‘getcellatposition’, event.args.pageX, event.args.pageY);
    if (cell != null) {
    $(“#grid2”).jqxGrid(‘setcellvalue’, cell.row, cell.column, value);
    }
    });
    },
    theme: theme,
    selectionmode: ‘singlecell’,
    columns: [
    { text: ‘First Name’, dataField: ‘firstname’, width: 125 },
    { text: ‘Last Name’, dataField: ‘lastname’, width: 125 },
    { text: ‘Product’, dataField: ‘productname’, width: 200 }
    ]
    });
    $(“#grid2”).jqxGrid(
    {
    width: 450,
    theme: theme,
    selectionmode: ‘singlecell’,
    autoheight: true,
    source: { totalrecords: 10, unboundmode: true, datafields:
    [
    { name: ‘firstname’ },
    { name: ‘lastname’ },
    { name: ‘productname’ }
    ]
    },
    columns: [
    { text: ‘First Name’, dataField: ‘firstname’, width: 125 },
    { text: ‘Last Name’, dataField: ‘lastname’, width: 125 },
    { text: ‘Product’, dataField: ‘productname’, width: 200 }
    ]

    });
    });


    DavidSimmons
    Participant

    Thank you so much for letting me know.


    DavidSimmons
    Participant

    I post this a while back because you ask for code examples. This was the most complete way I could show the problem I am having and I have had no response.

    The problem is with any large data grid that has a remoteAutoComplete combobox editor with a large data source, the comboxbox works great the first time, but if you refresh the data grid using $(jqxgrid).jqxGrid(‘updatebounddata’); your remoteAutoComplete combobox editor will no longer work.

    Because of some of my requirements (AfterCRUDUpdates) I have to refresh the data grid after this field is edited to show support data in other columns that is calculated after the remoteAutoComplete data field is updated. This all takes place on the same update….

    I would really appreciate someone looking in to this. I think you should be able to refresh the datagrid’s data source using $(jqxgrid).jqxGrid(‘updatebounddata’); without breaking your remote Data Source use for comboBox editors…

    Please help…….


    DavidSimmons
    Participant

    Here is what I have come up with so far to format the date in a MySQL needed format. It works accept for the last day of the month. There must be a better way to do this.

    { text: ‘FollowUp’, dataField: ‘FollowUp’, width: 160, editable: true, filterable: false, columntype: ‘datetimeinput’, cellsformat: ‘MM-dd-yyyy’,
    cellvaluechanging: function (row, column, columntype, oldvalue, newvalue) {
    if (newvalue == “”) {
    return oldvalue;
    } else {
    return newvalue.getFullYear()+’-‘+(newvalue.getMonth()+1)+’-‘+(newvalue.getDate()+1);
    }
    }
    },


    DavidSimmons
    Participant

    I have been testing the databind() you suggested when the user clicks the refresh button and I am not seeing any change. Does this look like the correct way to perform it? I am still getting an empty Product List in my combobox after a refresh.

    refreshButton.click(function (event) {
    $(‘jqxgrid’).jqxGrid(‘updatebounddata’);
    ProductDataAdapter.databind();
    });

    var ProductSource = {
    datatype: “json”,
    datafields: [
    { name: ‘ID’ },
    { name: ‘Product’ }
    ],
    id: ‘id’,
    url: ‘../Product/ProductJSON.php’,
    async: false,
    data: {
    featureClass: “P”,
    style: “full”,
    maxRows: 12
    }
    };

    var ProductDataAdapter = new $.jqx.dataAdapter(ProductSource, {
    formatData: function (data) {
    $(“#message”).html(“Lookup: ” + lookupSearch);
    data.name_startsWith = lookupSearch;
    return data;
    }
    });


    DavidSimmons
    Participant

    That is not what I am seeing when using remoteAutoComplete. After the refresh, when you start typing for the next lookup the ComboBox is blank and does not populate. This is with large list. I have a product list of 10000 plus. If you do not refresh they all work very fast every time.

    If you are using small list were you do not need the remoteAutoComplete and you are only using the ComboBox’s dropdown arrow it will work after the refresh.

    My Datasource
    var ProductSearch=”;
    var ProductSource = {
    datatype: “json”,
    datafields: [
    { name: ‘ID’ },
    { name: ‘Product’ }
    ],
    id: ‘id’,
    url: ‘../Product/ProductJSON.php’,
    async: false,
    data: {
    featureClass: “P”,
    style: “full”,
    maxRows: 12
    }
    };

    var ProductDataAdapter = new $.jqx.dataAdapter(ProductSource, {
    formatData: function (data) {
    data.name_startsWith = ProductSearch;
    return data;
    }
    });

    My Editor
    { text: ‘Product’, datafield: ‘Product’, width: 180, editable: true, filterable: true, filtertype: ‘textbox’, columntype: ‘combobox’,
    createeditor: function (row, column, editor) {
    editor.jqxComboBox({selectedIndex: 0, source: ProductDataAdapter, remoteAutoComplete: true, autoOpen: false, dropDownHeight: 250, displayMember: “Product”, valueMember: “ID”,
    renderer: function (index, label, value) {
    var item = ProductDataAdapter.records[index];
    if (item != null) {
    var label = item.Product;
    return label;
    }
    return “”;
    },
    renderSelectedItem: function(index, item) {
    var item = ProductDataAdapter.records[index];
    if (item != null) {
    var label = item.Product;
    return label;
    }
    return “”;
    },
    search: function (searchString) {
    ProductSearch = searchString;//**** Used for my search
    ProductDataAdapter.dataBind();
    }
    });
    editor.bind(‘select’, function (event) {
    var item = event.args.item;
    if (item) {
    var value = item.value;
    var label = item.label;
    selectionID = value;/**** Used to capture the selectionID
    }
    });
    },
    cellvaluechanging: function (row, column, columntype, oldvalue, newvalue) {
    if (newvalue == “”) return oldvalue;
    }
    },

    in reply to: grid ComboBox editor issue grid ComboBox editor issue #14215

    DavidSimmons
    Participant

    Thanks again Peter for all your help, sorry to be a pain.

    When I started my app I did not have to do this. So I started looking into why I needed it and I am finding every ajax update comes back as an error, but the update occurred. Not sure yet but it seems it has to do with the jQuery 8.x release from what I am reading. Something about ajax json returns must now be a json format. I was using just and echo “someMessage” on update and have been for years, BAD ME.

    But know I can seem to get a correct JSON return.

    $.ajax({
    dataType: ‘json’,
    url: url,
    cache: false,
    data: data,
    success: function (data, status, xhr) {
    $(“#message”).html(“Transaction: ” + xhr.responseText);
    commit(true);
    },
    error: function (jqXHR, textStatus, errorThrown) {
    $(“#message”).html(“Transaction: Error ” + errorThrown);
    commit(false);
    }
    });

    Is there anything you know of that is required? I commented out all my update results out so there was no results sent back from the server but still get the error.

    Have any suggestion?

    in reply to: grid ComboBox editor issue grid ComboBox editor issue #14169

    DavidSimmons
    Participant

    Hi Peter,

    I would really appreciate any help on this issue. As you will see below I have found the main trigger for the issue….

    I have found where the ComboBox is failing. In my updaterow function shown below I needed to refresh my data grid after an update. This is affecting the ComboBox datasource or the renderer. When I comment out the $(jqxgrid).jqxGrid(‘updatebounddata’); in the update, I was able to update Products for over 50 LineItems using the keyboard navigation with no issues. As soon as I remove the comment on $(jqxgrid).jqxGrid(‘updatebounddata’); I get the same results which are empty ComboBox list or the ComboBox show other Product items in the current data grid. I was able to duplicate this is any page I have.

    One key is the ComboBox is using a remoteDataSource …..

    I get the same effect when using a button to trigger $(jqxgrid).jqxGrid(‘updatebounddata’); It is absolute and overtime.

    Something is wrong with $(jqxgrid).jqxGrid(‘updatebounddata’); or the effect on the ComboBox’s datasource or renderer.

    my updaterow function:

    $.ajax({
    dataType: ‘json’,
    url: url,
    cache: false,
    data: data,
    success: function (data, status, xhr) {
    $(“#message”).html(“Transaction: ” + xhr.responseText);
    commit(true);
    $(jqxgrid).jqxGrid(‘updatebounddata’);
    },
    error: function (jqXHR, textStatus, errorThrown) {
    $(“#message”).html(“Transaction: ” + jqXHR.responseText);
    commit(false);
    $(jqxgrid).jqxGrid(‘updatebounddata’);
    }
    });

    in reply to: grid ComboBox editor issue grid ComboBox editor issue #14105

    DavidSimmons
    Participant

    When using custom editors is the datasource for the editor ran each time the editor is used, something like an ajax call?

    I think this my problem on the datagrid row second edit the datasource is not run because the ComboBox is blank or contains items that exist within the same field within the current data grid.

    Is there a way I can send and email to you with files. I could build an example using the northwind database if this would help.

    in reply to: grid ComboBox editor issue grid ComboBox editor issue #14074

    DavidSimmons
    Participant

    Ok, I think I have everything working. If I am understanding your example there seems to be design issue with the foreign Key lookup…

    The problem is if you main datasource does not include every option from the lookup data source the drop down list only contains the items that exist in the main datasource, not the all items from the lookup data source.

    What I am trying to do, which is common to most database web applications store the lookupID in the main datasource table and allow the user to select from a complete list of optional choices or that come from a lookupDatasource. This should be a ComboBox that includes values and names.

    Proudct1
    Proudct2
    Proudct3
    Proudct4

    Because this is like and invoiceApp you are adding LineItems and assigning the Product for each LineItem. The reason I need to use the ComboBox is to use autoComplete. I might have 10000 products.

    **********************************************************************
    Currently this is my ProductDataSource looks like this

    var ProductSearch=”;
    var ProductIndex=0;

    var ProductSource = {
    datatype: “json”,
    datafields: [
    { name: ‘ID’ },
    { name: ‘Product’ }
    ],
    id: ‘id’,
    url: ‘../Product/ProductJSON.php’,
    async: false,
    data: {
    featureClass: “P”,
    style: “full”,
    maxRows: 12
    }
    };

    var ProductDataAdapter = new $.jqx.dataAdapter(ProductSource, {
    formatData: function (data) {
    $(“#message”).html(ProductSearch);
    data.name_startsWith = ProductSearch;
    return data;
    }
    });

    **********************************************************************
    My Column custom editor
    { text: ‘Product’, datafield: ‘Product’, width: 180, editable: true, filterable: true, filtertype: ‘textbox’, columntype: ‘combobox’,
    createeditor: function (row, column, editor) {
    editor.jqxComboBox({selectedIndex: 0, source: ProductDataAdapter, remoteAutoComplete: true, remoteAutoCompleteDelay: 200, autoOpen: false, dropDownHeight: 200, displayMember: “Product”, valueMember: “ID”,
    renderer: function (index, label, value) {
    var item = ProductDataAdapter.records[index];
    if (item != null) {
    var label = item.Product;
    return label;
    }
    return “”;
    },
    renderSelectedItem: function(index, item) {
    var item = ProductDataAdapter.records[index];
    if (item != null) {
    var label = item.Product;
    return label;
    }
    return “”;
    },
    search: function (searchString) {
    ProductSearch = searchString;
    ProductDataAdapter.dataBind();
    }
    });
    editor.bind(‘select’, function (event) {
    var item = event.args.item;
    if (item) {
    var value = item.value;
    var label = item.label;
    ProductIndex = value;
    }
    });
    },
    cellvaluechanging: function (row, column, columntype, oldvalue, newvalue) {
    if (newvalue == “”) return oldvalue;
    },
    },

    **********************************************************************
    This works perfect the first time and is very fast. My problem is that I don’t think the ProductDataSource resets or preforms a clean lookup the second time. Being that async is false should it perform a lookup each time?

    **********************************************************************

    in reply to: grid ComboBox editor issue grid ComboBox editor issue #14070

    DavidSimmons
    Participant

    I am confused why there are two data fields with the same name..

    { name: ‘EmployeeID’, displayname: ‘EmployeeName’, map: ‘m\\:properties>d\\:EmployeeID’, text: ‘EmployeeName’, id: ‘EmployeeID’, source: employeesAdapter.records },
    { name: ‘EmployeeID’, map: ‘m\\:properties>d\\:EmployeeID’ },

    Do one of these represent the OrdersDataSource and the other EmployeeDataSource?

    In my design my columns from the two data sources will not have the same name. That is why I am asking.

    in reply to: grid ComboBox editor issue grid ComboBox editor issue #14061

    DavidSimmons
    Participant

    Thanks for your patience, I have this working now… Because I have very large lookups, will this method work with columntype: ‘combobox’?

    Here is my test code for create editor and company companyDataSource…

    { text: ‘Company’, datafield: ‘CompanyID’, displayfield: ‘Company’, width: 200, editable: true, filterable: true, filtertype: ‘textbox’, columntype: ‘combobox’,
    createeditor: function (row, column, editor) {
    editor.jqxComboBox({selectedIndex: 0, source: CompanyDataAdapter, autoComplete: true, autoOpen: false, dropDownHeight: 250, displayMember: “Company”, valueMember: “CompanyID”,
    renderer: function (index, label, value) {
    var item = CompanyDataAdapter.records[index];
    if (item != null) {
    var label = item.Company;
    return label;
    }
    return “”;
    },
    renderSelectedItem: function(index, item) {
    var item = CompanyDataAdapter.records[index];
    if (item != null) {
    var label = item.Company;
    return label;
    }
    return “”;
    },
    search: function (searchString) {
    CompanySearch = searchString;
    CompanyDataAdapter.dataBind();
    }
    });
    },
    cellvaluechanging: function (row, column, columntype, oldvalue, newvalue) {
    if (newvalue == “”) return oldvalue;
    }

    DataSource:*******
    var CompanySearch=”;
    var CompanyIndex=0;

    var CompanySource = {
    datatype: “json”,
    datafields: [
    { name: ‘CompanyID’ },
    { name: ‘Company’ }
    ],
    id: ‘CompanyID’,
    url: ‘../Company/CompanyJSON.php’,
    async: false,
    data: {
    featureClass: “P”,
    style: “full”,
    maxRows: 12
    }
    };

    var CompanyDataAdapter = new $.jqx.dataAdapter(CompanySource, {
    formatData: function (data) {
    data.name_startsWith = CompanySearch;
    return data;
    }
    });

Viewing 15 posts - 46 through 60 (of 120 total)