EasyUI Forum
May 28, 2024, 01:44:58 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: 1 ... 4 5 [6] 7 8 ... 239
76  General Category / EasyUI for jQuery / Re: How to get a CheckBox's checked/unchecked status? on: June 27, 2019, 07:24:47 AM
Call the 'options' method to get this property.
Code:
var opts = $('#cb').checkbox('options');
console.log(opts.checked);
77  General Category / EasyUI for jQuery / Re: Disable combobox editor in a datagrid programatically on: June 27, 2019, 07:21:15 AM
With the 'onBeginEdit' event, you can get the combobox editor and disable it.
Code:
onBeginEdit: function(index,row){
var ed = $(this).datagrid('getEditor', {index:index,field:'CALDATE'});
var combo = $(ed.target);
combo.combobox('disable')
}
78  General Category / EasyUI for jQuery / Re: How can I get field with datagrid onRowContextMenu on: June 27, 2019, 07:15:54 AM
Please try this code to get the field name.
Code:
onRowContextMenu: function(e){
var td = $(e.target).closest('td[field]');
var field = td.attr('field');
console.log(field)
}
79  General Category / EasyUI for jQuery / Re: The problem of using pivotgrid on mobile devices on: June 24, 2019, 07:30:46 AM
Please try to set the 'nowrap' to true, 'autoRowHeight' to false. Or call 'fixRowHeight' method to fix the row height.
80  General Category / EasyUI for jQuery / Re: How to define a textbox-label's vertical-align? on: June 24, 2019, 07:18:53 AM
You can override this code to custom the label's style.
Code:
.textbox-label{
  ...
}
81  General Category / EasyUI for jQuery / Re: How to highlight a tag with hover? on: June 24, 2019, 07:16:05 AM
Just define this css style.
Code:
<style type="text/css">
.tagbox-label:hover{
background: #ddd;
}
</style>
82  General Category / EasyUI for jQuery / Re: How to prevent tagbox from accepting invalid tag? on: June 24, 2019, 07:14:18 AM
Please override the 'enter' handler to custom your tag logic.
Code:
$('#tb').tagbox({
keyHandler: $.extend({}, $.fn.tagbox.defaults.keyHandler, {
enter: function(e){
var t = $(this);
var v = $.trim($(this).tagbox('getText'));
if (v !== '' && v.length<6){
var values = $(this).tagbox('getValues');
values.push(v);
$(this).tagbox('setValues', values);
}
}
})
})
83  General Category / EasyUI for jQuery / Re: units such as rem,em don't work in easyui? on: June 18, 2019, 07:14:19 PM
Use this code instead.
Code:
<span style="display:inline-block;width:20rem;>
<input class="easyui-textbox" style="width:100%">
</span>
84  General Category / EasyUI for jQuery / Re: Transparent background of sidemenu on: June 18, 2019, 06:57:39 PM
Override this style to make the sidemenu panel transparent.
Code:
.sidemenu .accordion{
background: transparent;
}

To show the sidemenu programmatically, please try this code.
Code:
var h = $('#sm').find('.accordion').accordion('getPanel',0).panel('header');
h.tooltip('show')
85  General Category / EasyUI for jQuery / Re: SwitchButton keyboard events on: June 12, 2019, 07:13:22 PM
Please rewrite the 'keydown.switchbutton' event handler.
Code:
$('#sb').next().unbind('keydown.switchbutton').bind('keydown.switchbutton', function(e){
if (e.keyCode == 32){
var opts = $('#sb').switchbutton('options');
$('#sb').switchbutton(opts.checked ? 'uncheck' : 'check')
}
});
86  General Category / EasyUI for jQuery / Re: Adding a second textbox header row in datagrid on: June 12, 2019, 07:05:33 PM
You can set the title with multiple lines, the text on the top and the input on the bottom. Please try this code.
Code:
var columns = [
{ field: 'itemid', title: 'Item ID<br><input class="hinput">', width: 60 },
{
field: 'productid', title: 'Product<br><input class="hinput">', width: 100,
...
Code:
<style type="text/css">
.hinput{
width: 100%;
}
</style>
87  General Category / EasyUI for jQuery / Re: Form Load and ComboBox OnChange / OnSelect.... on: May 27, 2019, 07:18:48 PM
In 1.3.x, calling 'setValue' method only trigger the 'onChange' event. In 1.8.x, calling 'setValue' method may trigger the 'onSelect' and 'onUnselect' events before the 'onChange' event. If your issue continues, please show some code snippets to demonstrate your issue.
88  General Category / EasyUI for jQuery / Re: Datagrid continue editing row after negative validation check on: May 20, 2019, 06:59:56 PM
You can define a hidden field with validatebox editor. When none of the checkbox is checked, set the validatebox editor to empty. This will prevent the datagrid from ending the editing action as the validating result is failure. Please refer to the code below:
Code:
$('#dg').datagrid({
columns: [[
{field:'f1',title:'title1',width:100,editor:{type:'checkbox',options:{on:'On',off:'Off'}}},
{field:'f2',title:'title2',width:100,editor:{type:'checkbox',options:{on:'On',off:'Off'}}},
{field:'f3',title:'title3',width:100,editor:{type:'checkbox',options:{on:'On',off:'Off'}}},
{field:'f4',title:'title4',width:100,editor:{type:'checkbox',options:{on:'On',off:'Off'}}},
{field:'f5',title:'title5',width:100,editor:{type:'checkbox',options:{on:'On',off:'Off'}}},
{field:'h',title:'hidden',hidden:true,width:100,editor:{type:'validatebox',options:{required:true}}}
]],
onBeginEdit: function(index,row){
var f1 = $(this).datagrid('getEditor',{index:index,field:'f1'});
var f2 = $(this).datagrid('getEditor',{index:index,field:'f2'});
var f3 = $(this).datagrid('getEditor',{index:index,field:'f3'});
var f4 = $(this).datagrid('getEditor',{index:index,field:'f4'});
var f5 = $(this).datagrid('getEditor',{index:index,field:'f5'});
var h = $(this).datagrid('getEditor',{index:index,field:'h'});
var c1 = $(f1.target).change(_changeHandler);
var c2 = $(f2.target).change(_changeHandler);
var c3 = $(f3.target).change(_changeHandler);
var c4 = $(f4.target).change(_changeHandler);
var c5 = $(f5.target).change(_changeHandler);
function _changeHandler(){
if (c1.is(':checked')||c2.is(':checked')||c3.is(':checked')||c4.is(':checked')||c5.is(':checked')){
$(h.target).val(true)
} else {
$(h.target).val('')
}
}
}
})
89  General Category / General Discussion / Re: buttons with placeholder in a pagination on: May 17, 2019, 08:05:04 PM
Please set the 'visibility' style to 'hidden' instead of hiding it. This is the example shows how to achieve it.

http://code.reloado.com/ogamep/edit#preview
90  General Category / EasyUI for jQuery / Re: How can I set checkbox and radiobutton readonly? on: May 07, 2019, 11:54:19 PM
Please set the 'readonly' property. Make sure to download the newest version from the site.
Pages: 1 ... 4 5 [6] 7 8 ... 239
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!