Show Posts
|
Pages: 1 [2] 3 4 5
|
17
|
General Category / EasyUI for jQuery / Cell data validation for "cellediting"
|
on: March 17, 2019, 08:04:38 AM
|
I set the validation property for each column in the datagrid. Now I want that when the current cell data fails validation, other cells cannot enter the edit by clicking. I did this with the following code: var editcell; $('#dg').edatagrid({ //........ onBeforeCellEdit:function(index,field){ if(editcell != undefined){ $(this).datagrid('editCell',editcell); return false } }, onCellEdit:function(index,field){ editcell = $(this).datagrid('cell'); }, onEndEdit:function(index,row){ editcell = undefined; } }).edatagrid('disableEditing').datagrid('enableCellSelecting').datagrid('enableCellEditing')
This seems to have achieved the goal. However, when the first column of cells fails validation, although the data returned to it has already met the requirements, I can find it difficult to click and edit other cells. Please help me improve the code, thank you!
|
|
|
18
|
General Category / EasyUI for jQuery / Panel settings in the portal
|
on: March 11, 2019, 09:23:21 PM
|
The page code is as follows: <div id="first" class="easyui-portal"...> <div style="width:70%"> <div id="bts" ...></div> <div id="sales" ...></div> </div> <div style="width:30%"> <div id="msg" ...></div> <div id="log" ...></div> </div> </div>
Now I want to add an action button to the ‘bts’ panel: $('#bts').panel({ tools:[{ iconCls:'icon-tools', ... }] })
The button works fine. However, the panel cannot be dragged. Where is my problem? Please help, thank you!
|
|
|
21
|
General Category / EasyUI for jQuery / When loading other pages used to generate dialogs, the layout is messed up
|
on: March 07, 2019, 03:27:54 AM
|
Hello, everyone. I have two page files: "test1.html" is used to generate a dialog with the following code: <body> <div id="cs"></div> <script> $(function(){ $('#cs').dialog({ title:'my title', width:200, height:200, content:'test' }) }) </script> </body>
"test2.html" is used to generate the layout. When clicking the button, I want to call the dialog in "test1.html". code show as below: <body class="easyui-layout"> <div region="north" style="height: 60px"> <div id="bt" class="easyui-linkbutton" onclick="$('#dlg').load('test1.html')">button</div> </div> <div region="west" width=180 title="menu"></div> <div id="dlg"></div> </body>
The problem is that when the button is clicked, although the dialog box is displayed, the layout of the layout is messed up. Please help, thank you very much!
|
|
|
22
|
General Category / EasyUI for jQuery / How to perform different operations on the same column in the pivotgrid?
|
on: January 23, 2019, 08:00:42 AM
|
For example, I want to perform both max and min operations on the price column, but the results are all max. pivot:{ rows: ..., columns: ..., values:[ {field:'price',title:'price_max',op:'max'}, {field:'price',title:'price_min',op:'min'} ], },
Also, how can I get the forzenColumn column in the pivotgrid? I want to modify the width of it. Thank you.
|
|
|
26
|
General Category / EasyUI for jQuery / Re: The fixDetailRowHeight property setting when subgrid is nested
|
on: January 21, 2019, 08:41:41 PM
|
Please show your code to demostrate your issue.
This is the complete code: var dg = { //Initial table url:'griddata', columns:[[ {field:'e',expandder:true}, {field:'ck',checkbox:true}, {field:'cp',title:'product',halign:'center'}, {field:'kh',title:'customer',halign:'center'}, {field:'gy',title:'employee',halign:'center'}, {field:'sl',title:'amount',halign:'center',align:'right'}, {field:'dj',title:'price',halign:'center',align:'right'}, {field:'zk',title:'discount',halign:'center',align:'right'}, {field:'je',title:'amount',halign:'center',align:'right'}, {field:'rq',title:'date',align:'center'} ]], pagination:true }; var sub1 = { //Child table 1 url:'gydata', foreignField:'cp', columns:[[ {field:'kh',title:'customer',width:'45%'}, {field:'sl',title:'amount',width:'45%'}, ]], onLoadSuccess: function(param){ var pg = $(this).datagrid('getParentGrid'); var index = $(this).datagrid('getParentRowIndex'); pg.datagrid('fixDetailRowHeight',index); } }; var sub2 = { //Child table 2 url:'gydata', foreignField:'kh', columns:[[ {field:'gy',title:'employee',width:'50%'}, {field:'sl',title:'amount',width:'50%'}, ]], onBeforeLoad:function(param){ var pg = $(this).datagrid('getParentGrid'); var index = pg.datagrid('getParentRowIndex'); var row = pg.datagrid('getParentGrid').datagrid('getRows')[index]; param.fzl = row.cp //Submit fzl parameters to the server at the same time }, onLoadSucess: function(){ var pg = $(this).datagrid('getParentGrid'); var index = $(this).datagrid('getParentRowIndex'); pg.datagrid('fixDetailRowHeight',index); index = pg.datagrid('getParentRowIndex'); pg.datagrid('getParentGrid').datagrid('fixDetailRowHeight',index); }, }; $('#test').datagrid().datagrid('subgrid',{ options:dg, subgrid:{ options:sub1, subgrid:{ options:sub2 } } })
I uploaded a few more screenshots. among them: 1, the initial expansion effect 2, the effect of re-expanding after folding 3, the effect of the second sub-table expansion 4, the effect of the second sub-sheet after folding
|
|
|
28
|
General Category / EasyUI for jQuery / Bufferview and scrollview cannot load data
|
on: January 21, 2019, 07:52:43 AM
|
In the following sample code, if the 'view' is removed, the data can be loaded and displayed normally. If you add 'view', you can see the server's return data in the console, but the datagrid display is empty. Why is that? Where is the writing wrong? Please correct me, thank you! $('#p').datagrid({ url:'test.php', columns:[[......]], view:scrollview, })
|
|
|
30
|
General Category / EasyUI for jQuery / The fixDetailRowHeight property setting when subgrid is nested
|
on: January 21, 2019, 04:26:25 AM
|
Look at the sample code: var dg = { url:'griddata.php', columns:[[...]], pagination:true }; var sub1 = { url:'gydata.php', foreignField:'cp', columns:[[...]], onLoadSuccess: function(param){ var pg = $(this).datagrid('getParentGrid'); var index = $(this).datagrid('getParentRowIndex'); pg.datagrid('fixDetailRowHeight',index); } }; var sub2 = { url:'gydata.php', foreignField:function(prow){ return prow }, columns:[[...]], onLoadSucess: function(){ var pg = $(this).datagrid('getParentGrid'); var index = $(this).datagrid('getParentRowIndex'); pg.datagrid('fixDetailRowHeight',index); index = pg.datagrid('getParentRowIndex'); pg.datagrid('getParentGrid').datagrid('fixDetailRowHeight',index); }, }; $('#test').datagrid().datagrid('subgrid',{ options:dg, subgrid:{ options:sub1, subgrid:{ options:sub2 } } })
After running, the detail row height is not automatically fixed. I have been studying for a long time and I don't know where the problem is. Please help me, thank you!
|
|
|
|