EasyUI Forum
March 04, 2024, 02:12:49 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: 1 ... 148 149 [150] 151
2236  General Category / General Discussion / Re: last selected on combobox on reload on: June 07, 2014, 05:44:42 AM
If a data item has 'selected' property set to true, it will be selected when loaded successfully. All you need to do is to set 'selected' property for the specified item from your returned json data. Look at the following data, the 'Ruby' item will be selected since its 'selected' property is set to true.
Code:
[{
"value":1,
"text":"Java"
},{
"value":2,
"text":"C#"
},{
"value":3,
"text":"Ruby",
"selected":true
}]
2237  General Category / Bug Report / Re: Datagrid row filter on: June 03, 2014, 08:38:53 AM
Please try to download the latest 'datagrid-filter.js' file from http://www.jeasyui.com/extension/datagrid_filter.php
2238  General Category / EasyUI for jQuery / Re: automatic check/select data in datagrid on: June 03, 2014, 07:50:23 AM
The 'checkRow' method must be called after loaded data successfully, so please do the checking rows in the 'onLoadSuccess' event.
Code:
<table id="package_group_table" class="easyui-datagrid" style="width:250px;height:150px"
    data-options="url:admin/packagegroup/list_package_group_for_checkbox',singleSelect:false,
    onLoadSuccess:function(){
var rows = $(this).datagrid('getRows');
for(var i=0; i<rows.length; i++){
if (rows[i]['CHECKED']){
$(this).datagrid('checkRow',i);
}
}   
    }
    ">
    <thead>
        <tr>
            <th data-options="field:'PACKAGE_GROUP_ID'">ID</th>
            <th data-options="field:'PACKAGE_GROUP_ALIAS'">Name</th>
            <th data-options="field:'CHECKED'">Status</th>
            <th data-options="field:'CHECKED_STATUS',checkbox:true">Ck</th>
        </tr>
    </thead>
</table>
2239  General Category / EasyUI for jQuery / Re: Combobox autocomplete whilst limiting options to those listed on: June 02, 2014, 05:11:03 PM
A possible solution to solve this issue is to add a validate type to this combobox. When inputed value is invalid, the prompt message will display.
Code:
$.extend($.fn.validatebox.defaults.rules,{
       inList:{
              validator:function(value,param){
                     var c = $(param[0]);
                     var opts = c.combobox('options');
                     var data = c.combobox('getData');
                     var exists = false;
                     for(var i=0; i<data.length; i++){
                            if (value == data[i][opts.textField]){
                                   exists = true;
                                   break;
                            }
                     }
                     return exists;
              },
              message:'invalid value.'
       }
})
Apply this 'inList' validation type to a combobox component.
Code:
$('#cc').combobox({
       validType:'inList["#cc"]'
});
2240  General Category / EasyUI for jQuery / Re: Uncaught TypeError: Cannot read property 'hidden' of null datagrid-filter.js:386 on: May 29, 2014, 03:03:15 PM
The rows must be an array, so the returned data should be as.
Code:
{"total":1,"rows":[{...}]}
2241  General Category / Bug Report / Re: Menubutton: Incorrect menu position on: May 28, 2014, 08:45:33 PM
Our developer team has solved this menu issue. Now the menu can adjust its height automatically when displaying on top or on bottom of the button. The patch file can be downloaded from http://www.jeasyui.com/download/downloads/jquery-easyui-1.3.6-patch.zip.
2242  General Category / Bug Report / Re: Menubutton: Incorrect menu position on: May 28, 2014, 02:30:13 PM
The height of edit menu is too large to display normally. If it can not display on bottom, it will try to display on the top. If it can not display on top again, it will go back to the bottom.
So to solve your issue, the simplest way is to limit the height for the menu. Set a height style for it.
2243  General Category / Bug Report / Re: Menubutton: Incorrect menu position on: May 28, 2014, 09:25:19 AM
This is the default behavior of the menubutton. The menu display either on the top or on the bottom of the button. If you want, you can override the 'show' method of the menu to change its default behavior.
2244  General Category / Bug Report / Re: Menubutton: Incorrect menu position on: May 28, 2014, 01:21:10 AM
The newest patch file has solve this issue. It can be downloaded from http://www.jeasyui.com/download/downloads/jquery-easyui-1.3.6-patch.zip
2245  General Category / EasyUI for jQuery / Re: prepend a blank option to combobox on: May 28, 2014, 01:13:30 AM
You can use 'loadFilter' function to prepend an empty row, please try this code:
Code:
$('#cc').combobox({
  loadFilter:function(data){
       var opts = $(this).combobox('options');
       var emptyRow = {};
       emptyRow[opts.valueField] = '';
       emptyRow[opts.textField] = '&nbsp;';
       data.unshift(emptyRow);
       return data;
  }
})
2246  General Category / EasyUI for jQuery / Re: Uncaught TypeError: Cannot read property 'hidden' of null datagrid-filter.js:386 on: May 27, 2014, 08:12:40 AM
Please download the latest 'datagrid-filter.js' file from http://www.jeasyui.com/extension/datagrid_filter.php
2247  General Category / EasyUI for jQuery / Re: Attach searchbox to pagination in Datagrid on: May 27, 2014, 07:06:10 AM
Please try this code:
Code:
var pager = $('#dg').datagrid('getPager');
var input = $('<input>').appendTo('body');
pager.pagination({buttons:input});
input.searchbox();
2248  General Category / EasyUI for jQuery / Re: datagrid column fit to available width on: May 27, 2014, 07:03:28 AM
First of all, set the 'fitColumns' property to true for the datagrid, and then set the 'fixed:true' for all the columns except the final column. The code looks like this:
Code:
<table id="dg" class="easyui-datagrid" title="Basic DataGrid" style="width:700px;height:250px"
        data-options="
        fitColumns:true,
        singleSelect:true,url:'datagrid_data1.json',method:'get'">
    <thead>
        <tr>
            <th data-options="field:'itemid',width:80,fixed:true">Item ID</th>
            <th data-options="field:'productid',width:60,fixed:true">Product</th>
            <th data-options="field:'listprice',width:80,align:'right',fixed:true">List Price</th>
            <th data-options="field:'unitcost',width:80,align:'right',fixed:true">Unit Cost</th>
            <th data-options="field:'attr1',width:150">Attribute</th>
        </tr>
    </thead>
</table>
2249  General Category / Bug Report / Re: menu height higher than document height on: May 25, 2014, 08:10:17 AM
This issue has been solved now. Please download the latest patch file from http://www.jeasyui.com/download/downloads/jquery-easyui-1.3.6-patch.zip.
2250  General Category / Bug Report / Re: header check on datagrid on: May 25, 2014, 08:08:18 AM
Please download the latest patch file from http://www.jeasyui.com/download/downloads/jquery-easyui-1.3.6-patch.zip. You only need to include the 'jquery.easyui.patch.js' file to the page.
Pages: 1 ... 148 149 [150] 151
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!