EasyUI Forum
June 16, 2024, 07:43:14 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: 1 [2] 3 4 5
16  General Category / EasyUI for jQuery / Re: Cell data validation for "cellediting" on: March 18, 2019, 04:05:08 AM
thanks for the reply. I know the usage of this column attribute. The key now is that I don't want other cells to be selected when validation fails.

As shown below:
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:

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:
Code:
<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:
Code:
$('#bts').panel({
tools:[{
iconCls:'icon-tools',
                ...
        }]
})

The button works fine. However, the panel cannot be dragged. Where is my problem? Please help, thank you!
19  General Category / EasyUI for jQuery / Re: When loading other pages used to generate dialogs, the layout is messed up on: March 07, 2019, 10:31:26 PM
Understand that it is only necessary to load the body part of the page.
Thanks.
20  General Category / EasyUI for jQuery / Re: When loading other pages used to generate dialogs, the layout is messed up on: March 07, 2019, 08:35:22 AM
After adding "center", the same problem still occurs:
Code:
<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 region="center" title="content"></div>
<div id="dlg"></div>
</body>


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:

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:

Code:

<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.

Code:

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.
23  General Category / EasyUI for jQuery / Re: How can I get the combobox object in the pivotgrid? on: January 23, 2019, 02:45:48 AM
Well, great, thanks.
24  General Category / EasyUI for jQuery / How can I get the combobox object in the pivotgrid? on: January 22, 2019, 09:46:52 PM
As shown in the figure, how can I get the combobox object in the toolbar? I want to modify its margins and labels.
I have solved it by means of a selector, but I always feel a little troublesome and look forward to a better solution.
Thank you.
25  General Category / EasyUI for jQuery / Re: The fixDetailRowHeight property setting when subgrid is nested on: January 22, 2019, 02:21:59 AM
It is indeed an error of 'expandder'. Embarrassed
The problem is solved, thank you very much.
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:

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
27  General Category / EasyUI for jQuery / Re: Bufferview and scrollview cannot load data on: January 21, 2019, 07:54:00 PM
The datagrid must have a height attribute.
solved!
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!

Code:
$('#p').datagrid({
url:'test.php',
columns:[[......]],
view:scrollview,
})
29  General Category / EasyUI for jQuery / Re: The fixDetailRowHeight property setting when subgrid is nested on: January 21, 2019, 06:13:14 AM
Try adding the 'expander' column, it doesn't work. Sad
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:

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!
Pages: 1 [2] 3 4 5
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!