jQWidgets Forums
Forum Replies Created
-
Author
-
September 7, 2018 at 9:10 am in reply to: Problems with Dropdownlist from Lookuptable Problems with Dropdownlist from Lookuptable #101893
Wow this took me some time and all it was, was a stupid typo:
var data="action=update&ID="+rowid.ID+"&Rückruf="+rowdata.Rückruf + "&Kategorie="+rowdata.Kategorie+"&Bekannt="+rowdata.Bekannt+"&Relevant="+rowdata.Relevant+"&Priorität="+rowdata.Priorität+"&GVID="+$rowdata.GVID;
See the $ before the last variable?
September 5, 2018 at 7:55 am in reply to: Problems with Dropdownlist from Lookuptable Problems with Dropdownlist from Lookuptable #101864I’m using newest desktop firefox.
what I just noticed:
cellendedit
has the edited value
cellvaluechanged
has the edited value asoldvalue
and the value before editing asnewvalue
September 4, 2018 at 9:56 am in reply to: Problems with Dropdownlist from Lookuptable Problems with Dropdownlist from Lookuptable #101841Yes usually it does. not in my case. it does effect all editable fields, not just the checkboxes… I edit a value/click a checkbox and when I finish it goes back to the original value…
cellvaluechanged
is fired and has the new value, butupdaterow
never fires.Here’s my updated source:
var gvsource={ datatype: "json", datafields: [ {name: 'label', type: 'string' }, {name: 'value', type: 'string'} ], url: './scripts/kategorien.php?action=getgv', async: false }; var gvadapter=new $.jqx.dataAdapter(gvsource,{ loadComplete: function(records) { var length = records.length; console.log('GVs:'+length); }, loadError: function(jqXHR, status, error) { console.log('GVs Error:'+error); }, beforeLoadComplete: function (records) { console.log('GVs Lade Daten!'); }, autoBind: true }); var source ={ datatype: "json", datafields: [ { name: 'ID' }, { name: 'Kategorie' }, { name: 'Rückruf', type: 'bool'}, { name: 'Bekannt', type: 'bool'}, { name: 'Relevant', type: 'bool'}, { name: 'Priorität', type: 'int'}, { name: 'GV', value: 'GVID', values: { source: gvadapter.records, value:'value', name:'label'}}, { name: 'GVID', type:'string'} ], id:'ID', url: './scripts/kategorien.php', root: 'Rows', beforeprocessing: function(data) { source.totalrecords=data[0].TotalRows; }, async: true, updateRow: function (rowid,rowdata,commit) { var data="action=update&ID="+rowid.ID+"&Rückruf="+rowdata.Rückruf + "&Kategorie="+rowdata.Kategorie+"&Bekannt="+rowdata.Bekannt+"&Relevant="+rowdata.Relevant+"&Priorität="+rowdata.Priorität+"&GVID="+$rowdata.GVID; $.ajax({ dataType:'html' , url:'./scripts/kategorien.php', data: data, success: function (data,status,xhr){ console.log(data); commit(true); }, error: function(xhr,status,error) { commit(false); console.log('error:'+xhr.responseText); } }); } }; var dataAdapter=new $.jqx.dataAdapter(source); $("#kategoriediv").jqxGrid({ source: dataAdapter, editable:true, width: 820, autoheight:true, selectionmode: 'singlecell', altrows:true, theme: theme, pageable:true, virtualmode: true, rendergridrows: function(params) { return params.data; }, columns: [ { text: 'ID', datafield: 'ID', width: 50, editable: false }, { text: 'Kategorie', datafield: 'Kategorie', width: 300,editable:false }, { text: 'Rückruf', datafield: 'Rückruf', width: 70,editable:true, columntype: 'checkbox' }, { text: 'Bekannt', datafield: 'Bekannt', width: 70,editable:true, columntype: 'checkbox' }, { text: 'Relevant', datafield: 'Relevant', width: 70,editable:true, columntype: 'checkbox' }, { text: 'Priorität', datafield: 'Priorität', width: 100,editable:true }, { text: 'GV-Vorlage', datafield: 'GVID', displayfield:'GV', editable:true,width: 150, columntype:'dropdownlist', createeditor: function(row, value, editor) { editor.jqxDropDownList({ source: gvadapter, displayMember: 'label', valueMember: 'value' }); } } ] }); $("#kategoriediv").on('cellselect', function (event) { var column = $("#kategoriediv").jqxGrid('getcolumn', event.args.datafield); var value = $("#kategoriediv").jqxGrid('getcellvalue', event.args.rowindex, column.datafield); var displayValue = $("#kategoriediv").jqxGrid('getcellvalue', event.args.rowindex, column.displayfield); console.log("Selected Cell - Row: " + event.args.rowindex + ", Column: " + column.text + ", Value: " + value + ", Label: " + displayValue); }); $("#kategoriediv").on('cellbeginedit', function (event) { console.log('edit'); }); $("#kategoriediv").on('cellendedit', function (event) { console.log('edit end'); }); $("#kategoriediv").on('cellvaluechanged', function (event) { var args=event.args; console.log('cell changed: old value:'+args.oldvalue+' new value:'+args.newvalue); });
Sample Output in Console:
edit cell changed: old value:false new value:true edit end
September 3, 2018 at 1:13 pm in reply to: Problems with Dropdownlist from Lookuptable Problems with Dropdownlist from Lookuptable #101809it seems that it’s not a problem with checkbox-columns alone. the event cellvaluechanged has the new value. the grid doesn’t show the updated value and updaterow is never fired.
September 3, 2018 at 12:50 pm in reply to: Problems with Dropdownlist from Lookuptable Problems with Dropdownlist from Lookuptable #101808I just found another problem. Since I set the grid to pageable, the checkboxcolumns don’t change their status when clicked anymore.
September 3, 2018 at 9:44 am in reply to: Problems with Dropdownlist from Lookuptable Problems with Dropdownlist from Lookuptable #101798The solution was indeed, to make the grid pageable. Now it works really good.
August 31, 2018 at 2:03 pm in reply to: Problems with Dropdownlist from Lookuptable Problems with Dropdownlist from Lookuptable #101777Well they are going into edit-mode so I can change the value with the keyboard, but it’s not dropping down the entries. I have no errors in the console.
And like I said before, if I scroll down a few hundred rows it suddenly works.
I haven’t tried yet, but maybe paging would solve this?August 30, 2018 at 11:08 am in reply to: Problems with Dropdownlist from Lookuptable Problems with Dropdownlist from Lookuptable #101760this is strange. my grid has quite a lot of rows (over 700) and if I scroll down several pages it works, but not on the rows above.
August 30, 2018 at 11:00 am in reply to: Problems with Dropdownlist from Lookuptable Problems with Dropdownlist from Lookuptable #101759That unfortunatly doesn’t change it. I can and could before change the entries with the keyboard, but they are not dropping down.
August 30, 2018 at 6:48 am in reply to: Problems with Dropdownlist from Lookuptable Problems with Dropdownlist from Lookuptable #101751Hello Martin,
that helped, now the label is filled for the column. When I click on a cell the little arrow for the dropdown shows, but the dropdown doesn’t open. any ideas? -
AuthorPosts