Show Posts
|
Pages: 1 [2] 3 4
|
16
|
General Category / EasyUI for jQuery / [Solved] Error on Drag and Drop Datagrid
|
on: July 17, 2023, 03:34:13 PM
|
Hi, Am having a problem w drag and drop on my Datagrid Uncaught TypeError: Cannot read properties of undefined (reading 'jQuery3310090322002266437942') at Q.get (jquery.min.js:2:32502) at Q.access (jquery.min.js:2:32622) at Function.data (jquery.min.js:2:33477) at Object.options (jquery.easyui.min.js:12493:12) at $.fn.datagrid (jquery.easyui.min.js:12356:35) at getDraggingRow (datagrid-dnd.js:390:27) at HTMLTableRowElement.onBeforeDrag (datagrid-dnd.js:152:25) at HTMLTableRowElement.<anonymous> (jquery.easyui.min.js:638:21) at HTMLTableRowElement.dispatch (jquery.min.js:2:41772) at y.handle (jquery.min.js:2:39791)
And also is there a way to import drag and drop to datalist?
|
|
|
19
|
General Category / EasyUI for jQuery / Re: DataList doesn't refresh after updateRow
|
on: July 15, 2023, 11:52:47 AM
|
Maybe there is a bug in my function? function saveInfo() { if (!($('#form').form('validate'))) { return; } const formData = $('#form').serializeArray(); if (fieldIdx >= 0) { const clickedField = $('#datalist').datalist('getRows')[fieldIdx]; formData.forEach(e => { clickedField[e.name] = e.value; }); $('#datalist').datalist('updateRow', { index: fieldIdx, row: clickedField }).datalist('refreshRow', fieldIdx); } $('#win').window('close'); }
|
|
|
21
|
General Category / EasyUI for jQuery / Re: Context Menu on DataGrid + showColumn / hideColumn
|
on: May 18, 2023, 10:27:11 AM
|
I got back into my project and found I think the simplest solution (function ($) { function buildMenu(target) { const state = $(target).data("datagrid"); if (!state.columnMenu) { state.columnMenu = $("<div></div>").appendTo("body"); state.columnMenu.menu({ onClick: function (item) { if (item.iconCls == "tree-checkbox1") { $(target).datagrid("hideColumn", item.name); $(this).menu("setIcon", { target: item.target, iconCls: "tree-checkbox0" }); } else { $(target).datagrid("showColumn", item.name); $(this).menu("setIcon", { target: item.target, iconCls: "tree-checkbox1" }); } $(state.columnMenu).show(); // HERE } }) const fields = $(target).datagrid("getColumnFields", true).concat($(target).datagrid("getColumnFields", false)); for (var i = 0; i < fields.length; i++) { var field = fields[i]; var col = $(target).datagrid("getColumnOption", field); if (col.hidden) { state.columnMenu.menu("appendItem", { text: col.title, name: field, iconCls: "tree-checkbox0" }); } else { state.columnMenu.menu("appendItem", { text: col.title, name: field, iconCls: "tree-checkbox1" }); } } } return state.columnMenu; } $.extend($.fn.datagrid.methods, { columnMenu: function (jq) { return buildMenu(jq[0]); } }); })(jQuery);
|
|
|
27
|
General Category / EasyUI for jQuery / Datebox can input 0 and save
|
on: February 28, 2023, 02:54:52 AM
|
Hi, I have a problem with datebox as editor in datagrid. I can input 0 in day/month/year like '2023-00-12' or '0000-03-14' and it will accept it and save, but if i edit while its '0000-12-1230' it will show as '1900-12-30'.
|
|
|
28
|
General Category / EasyUI for jQuery / Re: Datagrid options get values from object
|
on: February 08, 2023, 04:13:53 PM
|
Oh also i found out how to make function from database saved in JSON to run. columns.forEach(col=>{if(col.formatter){col.formatter=JSONfn.parse(JSONfn.stringify(col.formatter));}}); If there's a better way to do this, I'd be very happy to help, because at the moment I haven't come up with anything else
|
|
|
30
|
General Category / EasyUI for jQuery / Re: Datagrid options get values from object
|
on: February 08, 2023, 02:33:08 PM
|
Thanks for your answer, but I think I misunderstood the question. I would like to get the code from "formatter" like below because I can't find it in that form. formatter: function (value, row, index) { if (row.id_tc_bom == null && row.id_tc_object > 0 && row.id_status < 99) { return '<a style="color:inherit;" href="javascript:void(0)" onclick="horWinPrzypiszIDBomWin(0,'+row.id+')">'+value+'</a>'; } else { return value; } }
|
|
|
|