Show Posts
|
Pages: [1] 2
|
2
|
General Category / EasyUI for jQuery / Re: Detecting if a combo select was by a user
|
on: August 14, 2016, 11:22:07 PM
|
I've had the same problem i have a comobox with 'onSelect' options, and i want get the value of a numberbox when user select a list item. but the numberbox may NOT ready when onSelect auto triggered during the initial loading of form data <select id="cbxDemo" class="easyui-combobox" data-options="onSelect : function(rec) { var val = $('#nbxDemo').numberbox('getValue');// nbxDemo numberbox NOT ready when page load, we got undefined exception alert(val); }"> <option value="0">N/A</option> <option value="1">B</option> <option value="2">C</option> </select> i don't want to set a flag to indicates if it is triggered by page initial or .form('loadData', data) or user select. i'm now using try-catch to avoid undefined exception, but i think it is not a good way.
|
|
|
3
|
General Category / Bug Report / datagrid toolbar toggle linkbutton not works[SOLVED]
|
on: December 24, 2014, 10:01:47 PM
|
$('#datagrid').datagrid({ .... toolbar : [{ text : 'Name', toggle : true, group : 'myGroup', handler : function() { // ... } }, { text : 'Class', toggle : true, group : 'myGroup', handler : function() { // ... } }] });
i have a toolbar with 2 toggle buttons of the datagrid, but not works, anything wrong with my code?
|
|
|
4
|
General Category / EasyUI for jQuery / how can i dynamic change the view of datagrid (listview/groupview)
|
on: November 25, 2014, 09:04:07 PM
|
see the code bellow i want dynamic change the view of datagrid i can change to groupview, but i don't know why i cannot change back the view from groupview to defaultview. any step i missed? another question, should i destroy the previous datagrid before re-render new datagrid? how? <script type="text/javascript" src="datagrid-groupview.js" charset="utf-8"></script>
var defaultOpt = {...};//default list view
// switch view list/group name/group class function changeView(view) { var opt = $.extend(true, {}, defaultOpt); if (view == 0) {//default list view
} else if (view == 1) {//group by name opt.view = groupview; opt.groupField = 'Name'; opt.groupFormatter = function(value, rows){ return value; }; } else if (view == 2) {//group by class opt.view = groupview; opt.groupField = 'Class'; opt.groupFormatter = function(value, rows){ return value; }; }
$('#datagrid').datagrid(opt);//re-render datagrid }
|
|
|
5
|
General Category / Bug Report / Easyui 1.4 filebox bug!
|
on: August 26, 2014, 08:53:42 PM
|
see the code bellow <form id="ff" method="post"> <input class="easyui-filebox" name="file" style="width:200px;" /></td> </form>
Call form clear method first, then re-select a file, the bug happened. the filebox doesn't display the path/name of the selected file again PS:file still can be sumitted to server
|
|
|
8
|
General Category / EasyUI for jQuery / Re: how can i clear the rows of datagrid
|
on: August 12, 2014, 08:21:27 PM
|
yeah, it works upon lastest jquery.easyui.patch.js. pageNumber will be reset to 1 when load remote. thanks. $('#dtgResult').datagrid('options').pageNumber = 0; // reset pageNumber for bug-fixing loadData $('#dtgResult').datagrid('loadData', []);// supposed to clear previous results $('#dtgResult').datagrid('load', serialize($('#frmSearch'));// fetch new results from remote
i suggest adding 'clear' method or something like this in next version.
|
|
|
9
|
General Category / EasyUI for jQuery / Re: how can i clear the rows of datagrid
|
on: August 12, 2014, 07:38:15 PM
|
i found a bug of datagrid when no data filled, see the code bellow <table class="easyui-datagrid" title="Basic DataGrid" style="width:700px;height:250px" data-options="pagination:true,pageSize:10"> <thead> <tr> <th data-options="field:'itemid',width:80">Item ID</th> <th data-options="field:'productid',width:100">Product</th> <th data-options="field:'listprice',width:80,align:'right'">List Price</th> <th data-options="field:'unitcost',width:80,align:'right'">Unit Cost</th> <th data-options="field:'attr1',width:250">Attribute</th> <th data-options="field:'status',width:60,align:'center'">Status</th> </tr> </thead> </table>
url property is undefined, the pager shows incorrectly,that is why loadData will trigger loader to load data _5d7(_60f); at line 8668 executed and loader will be called when loadData []. var _614=$(_60f).datagrid("getPager"); if(_614.length){ var _615=_614.pagination("options"); if(_615.total!=data.total){ _614.pagination("refresh",{total:data.total}); if(opts.pageNumber!=_615.pageNumber){ opts.pageNumber=_615.pageNumber; _5d7(_60f);//line 8668 } } }
|
|
|
10
|
General Category / EasyUI for jQuery / [FIXED] how can i clear the rows of datagrid
|
on: August 12, 2014, 02:20:10 AM
|
i have a datagrid and a search form, when submit search form, i want to clear the previous results first, then load new data from remote. i didn't find ' clear', ' reset' or something else in the docs i try to use loadData method to load empty data instead, like this: $('#dtgResult').datagrid('loadData', []);// supposed to clear previous results $('#dtgResult').datagrid('load', serialize($('#frmSearch'));// fetch new results from remote
i found loadData method will trigger loader to load data from remote if opt.url is not empty it is not supposed to load remote data after loadData from local. is that a bug? or is there anyway to meet my requirement?
|
|
|
11
|
General Category / Bug Report / Re: easyui 1.4 textbox bug!
|
on: August 06, 2014, 11:18:59 PM
|
still has problem under IE11
type some text into a textbox do any operation which can let the page lost focus, eg: alt+tab switch to some other window or switch to other IE tabs return back to the page,the textbox was reset
|
|
|
12
|
General Category / Bug Report / Re: textbox cannot load data if created by textarea
|
on: August 06, 2014, 05:58:54 PM
|
line 6619 is setting the value into the hidden control line 6635 is setting the display text i have lots of textarea in my project, it works well before v1.4 it will be a hard work to change all the textarea to input so i changed the source code, and it works. var f=$(_4b7).find("input["+p+"Name=\""+name+"\"]"); // ADD bugfix textarea textbox if (!f.length) f=$(_4b7).find("textarea["+p+"Name=\""+name+"\"]"); // END ADD
|
|
|
13
|
General Category / Bug Report / Re: textbox cannot load data if created by textarea
|
on: August 06, 2014, 01:39:43 AM
|
if change property 'message' tag from <input> to <textarea>, form data will not load successfully, i track the code, found the jq selector is: var f=$(_4b7).find("input["+p+"Name=\""+name+"\"]");textarea does not match the selector <textarea class="easyui-textbox" name="message" data-options="multiline:true" style="height:60px"></textarea>
|
|
|
14
|
General Category / Bug Report / combobox cannot load data correctly
|
on: August 05, 2014, 03:05:21 AM
|
try the code bellow, it is supposed to select option C0, but empty option was select. maybe v1.4 consider empty value equals 0, but it is wrong! <form id="ff" method="post"> <table cellpadding="5"> <tr> <td>Name:</td> <td><input class="easyui-textbox" type="text" name="name" data-options="required:true"></input></td> </tr> <tr> <td>Code:</td> <td><select class="easyui-combobox" name="code"> <option></option> <option value="0">C0</option> <option value="1">C1</option> <option value="2">C2</option> </select></td> </tr> </table> </form>
<script> function loadLocal(){ $('#ff').form('load',{ name:'myname', code:0 }); } </script>
|
|
|
15
|
General Category / Bug Report / textbox cannot load data if created by textarea
|
on: August 05, 2014, 01:54:07 AM
|
does textbox only support created by <input>? if markup tag is textarea, form data cannot be loaded into the textbox, is this planed? <form id="ff" method="post"> <table cellpadding="5"> <tr> <td>Name:</td> <td><input class="easyui-textbox" type="text" name="name" data-options="required:true"></input></td> </tr> <tr> <td>Message:</td> <td><input class="easyui-textbox" name="message" data-options="multiline:true" style="height:60px"></input></td> </tr> </table> </form> <script> function loadLocal(){ $('#ff').form('load',{ name:'myname', message:'message' }); } </script>
|
|
|
|