jQWidgets Forums
Forum Replies Created
-
Author
-
But at me, the createeditor isn’t call once. It calls it every times. And the source didn’t refresh or update. Do you have an example?
July 11, 2014 at 7:02 am in reply to: initeditor jqxdropdown source initeditor jqxdropdown source #57053and how can i update?
But in these line:
console.log(“grid : ” + comboEntries);the entries are correct…..why this?
July 11, 2014 at 6:36 am in reply to: initeditor jqxdropdown source initeditor jqxdropdown source #57048comboEntries is updated. See this is my console:
1.
grid : Counter_0.0,Counter_0.1,Counter_0.2,Counter_0.3,Counter_11,Motor,Steckdose,Test_Counter,Group_901,1
createeditor : Counter_0.0,Counter_0.1,Counter_0.2,Counter_0.3,Counter_11,Motor,Steckdose,Test_Counter,Group_901,1
initeditor : Counter_0.0,Counter_0.1,Counter_0.2,Counter_0.3,Counter_11,Motor,Steckdose,Test_Counter,Group_901,12.
grid : Counter_0.0,Counter_0.1,Counter_0.2,Counter_0.3,Counter_11,Motor,Steckdose,Test_Counter,Summen 1,1
createeditor : Counter_0.0,Counter_0.1,Counter_0.2,Counter_0.3,Counter_11,Motor,Steckdose,Test_Counter,Group_901,1
initeditor : Counter_0.0,Counter_0.1,Counter_0.2,Counter_0.3,Counter_11,Motor,Steckdose,Test_Counter,Group_901,1The First call is correct. the second is wrong. The second call has the same entries then the first call……
Thats my code:
var meterSource; meterSource = { datatype: "json", datafields: [ { name: 'Id', type: 'string' } , { name: 'Number', type: 'string' } , { name: 'Name', type: 'string' } ], // get Model Data url: sk.appHelper.getAppDomainAppVirtualPath() + "/Meter/GetMetersToAttach?meterId=" + id , async: false //, cache: false }; var comboEntries = new Array(); var meterDataAdapter = new $.jqx.dataAdapter(meterSource, { autoBind: true, beforeLoadComplete: function (records) { comboEntries = new Array(); // update the loaded records. Dynamically add EmployeeName and EmployeeID fields. for (var i = 0; i < records.length; i++) { var name = records[i].Name; comboEntries.push(name); } return comboEntries; } }); console.log("grid : " + comboEntries); // initialize jqxGrid $("#gridAttachedMeters").jqxGrid( { width: popUpWidth - 10 , autoheight: true , source: data , selectionmode: 'singlecell' , editable: true , columnsresize: true , showtoolbar: true , altrows: true , statusbarheight: 25 , rendertoolbar: function (toolbar) { var container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>"); var addButton = $("<div style='float: left; margin-left: 5px;'><img style='position: relative; margin-top: 2px;' src='Content/icons/new.png'/></div>"); container.append(addButton); toolbar.append(container); addButton.jqxButton({ width: 60, height: 20 }); // add new row. addButton.click(function () { $("#gridAttachedMeters").jqxGrid('addrow', 'MeterId', {}, "first"); }); } , columns: [ { text: "Id ", datafield: "Id", width: 1, hidden: true} , { text: "MeterNumber", datafield: "MeterNumber", width: 1, hidden: true } , { text: '@Resources.Meter.MeterModel_AttachedMeter', columntype: 'combobox', displayfield: "Name", datafield: "AttachedMeterId", width: '90%', createeditor: function (row, cellvalue, editor) { console.log("createeditor: " + comboEntries); editor.jqxComboBox({ source: comboEntries, displayMember: 'Name', valueMember: 'Id', width: '88%' }); } , initeditor: function (row, cellvalue, editor) { console.log("initeditor: " + comboEntries); editor.jqxComboBox({ source: comboEntries }); } // 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; } } , { text: '-', datafield: 'Delete', columntype: 'button', width: '10%', align: 'center', cellsrenderer: function () { return "-"; } , buttonclick: function (row) { // get the clicked row's data and initialize the input fields. var rowid = $('#gridAttachedMeters').jqxGrid('getrowid', row); $('#gridAttachedMeters').jqxGrid('deleterow', rowid); } , aggregatesrenderer: function (aggregates, column, element) { var renderstring = "<div class='jqx-widget-content' style='float: left; width: 100%; height: 100%; '/>"; return renderstring; } } ] });
July 11, 2014 at 6:21 am in reply to: initeditor jqxdropdown source initeditor jqxdropdown source #57046Can you post an example?
I have the version 3.3.0 of jqWidget….July 11, 2014 at 6:08 am in reply to: initeditor jqxdropdown source initeditor jqxdropdown source #57044Yes, i try it:
createeditor: function (row, cellvalue, editor) { console.log("initeditor: " + comboEntries); editor.jqxComboBox({ source: comboEntries, displayMember: 'Name', valueMember: 'Id', width: '88%' }); } , initeditor: function (row, cellvalue, editor) { console.log("initeditor: " + comboEntries); editor.jqxComboBox({ source: comboEntries }); }
But in the console.log() never shown the new values
July 10, 2014 at 8:20 pm in reply to: initeditor jqxdropdown source initeditor jqxdropdown source #57025i have createeditor and initeditor…but still not working.
I am only want to laod the source new……:-(Does it works?
I have the same problem with the source….i can’t refresh the sourceWith “Leave the Side” i mean, when i load another side from my application and the i go back o the chart side…
I have a side with table and one side with chart. So when i click on legend to hide some lines from my chart, then i go to my tyble side and the i go on next step to chart side, the hidden lines are still hidden.
So i want, when i go to my table side, that all lines will be shown on next time, when i go to chart side…Do you have an example?
This happen is jqxgrid.filter.js in row :1190
var tmpvalue = new Date(cell);Cell Value =”0002″ -> Date {Tue Jan 01 0002 01:00:00 GMT+0100}
I found the problem.
The Values in Json 2 in Cell Nr is
0002
9003
and so on. This Value he can parse to an date.
Thats the reason….
So the next problem is, that the datafields: [] must be dynamic.
How can i do that?When i add a new row to grid, then i would o highlight a cell in grid
I would change the cell to life time.
This is not the solution for me.
Every Time when i change the page in grid, it will take for seconds…..
Thers no other solution or workaround?April 16, 2014 at 10:01 am in reply to: file upload input using jqxWidgets file upload input using jqxWidgets #53170when will it relesead?
-
AuthorPosts