jQuery UI Widgets › Forums › Grid › createeditor source call x-times
Tagged: call, createeditor, data adapter, dataadapter, grid, jqxDataAdapter, jqxgrid, loadComplete, multiple times, three times
This topic contains 5 replies, has 2 voices, and was last updated by Dimitar 10 years ago.
-
Author
-
Hi,
i have a Grid with a jqxDropDownList in createeditor:
When i click in this cell, it call more than one time the dataadapter…Grid
$("#grid").jqxGrid( { width: sk.appHelper.getMaxContentWidth() , height: sk.appHelper.getMaxGridHeight() , source: dataAdapter , editable: editable , editmode: 'dblclick' , columnsresize: true , columnsreorder: true , groupable: true , sortable: true , filterable: false , columns: [ { text: '@Resources.Tariff.Name', datafield: "Name", width: '20%' } , { text: '@Resources.Tariff.TimeFrom', datafield: "TimeFrom", cellsformat: 'HH:mm:ss', columngroup: '@Resources.Tariff.Time', width: '20%' } , { text: '@Resources.Tariff.TimeTill', datafield: "TimeTill", cellsformat: 'HH:mm:ss', columngroup: '@Resources.Tariff.Time', width: '20%' } , { text: '@Resources.Tariff.Day', columntype: 'dropdownlist', datafield: 'Day', width: '10%', createeditor: function (row, column, editor) { // assign a new data source to the dropdownlist. var days = [ { value: "0", label: '@Resources.Global.Monday' } , { value: "1", label: '@Resources.Global.Tuesday' } , { value: "2", label: '@Resources.Global.Wednesday' } , { value: "3", label: '@Resources.Global.Thursday' } , { value: "4", label: '@Resources.Global.Friday' } , { value: "5", label: '@Resources.Global.Saturday' } , { value: "6", label: '@Resources.Global.Sunday' } ]; editor.jqxDropDownList({ autoDropDownHeight: true, source: days, displayMember: 'label', valueMember: 'value' }); } } , { text: '@Resources.Tariff.Price', datafield: "Price", columngroup: '@Resources.Tariff.Time', width: '10%' } , { text: '@Resources.Tariff.Currency', columntype: 'dropdownlist', displayfield: "Currency", datafield: "CurrencyId", filtertype: 'checkedlist', width: '10%', createeditor: function (row, cellvalue, editor) { editor.jqxDropDownList({ source: dataAdapterCurrency, displayMember: 'Symbol', valueMember: 'Id', placeHolder: "Bitte wählen", dropDownHeight: 75 }); }, }, { text: "Id ", datafield: "Id", width: 1, hidden: true } ] });
DataApapter
// Datasource for Currency var sourceDropDownCurrency = { datatype: "json", datafields: [ { name: 'Id', type: 'string' } , { name: 'Symbol', type: 'string' } ], // get Model Data url: sk.appHelper.getAppDomainAppVirtualPath() + "/Tariff/GetCurrency" }; var dataAdapterCurrency = new $.jqx.dataAdapter(sourceDropDownCurrency);
Hello simcon94,
A similar situation is discussed in the following forum topic: http://www.jqwidgets.com/community/topic/using-dropdownlist-in-grid-call-datasource-3-times/. If it does not help you resolve your issue, please provide us with a JSFiddle example we can test to determine if there is anything wrong with your implementation.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Not really,
in this example was autobind: true
But in my code, i dont have autobind…..Hi simcon94,
Then please provide us with a JSFiddle example we can test to determine if there is anything wrong with your implementation.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/sorry, it cant do it in fiddle
Hi simcon94,
Unfortunately, without a sample to test, we cannot assist you. Please review your code and check for any lines where you re-bind the data adapter.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.