EasyUI Forum
December 01, 2025, 05:15:16 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / EasyUI for jQuery / How to make select field required with missingMessage on: July 26, 2012, 05:20:52 AM
i'm trying to make a plain select field required with a missingMessage like a "normal" validatebox, but with no luck....

i don't want to use a combobox, because i dont want the user to type in something other then predefined in the values...

2  General Category / EasyUI for jQuery / Re: Title in collapsed Layout Panel on: July 03, 2012, 03:07:51 PM
many thanks for the Help Grin

can i do something like this to show the title in collapsed east panel (closed at init with collapsed=true)??

Code:
$.parser.onComplete = function(){
$('body').css('visibility','visible');
var title = $('#mainlayout').layout('panel','east').panel('options').title;  // get the east panel title
var p = $('#mainlayout').data('layout').panels['expandEast'];  // the east expand panel
p.html('<div style="-moz-transform: rotate(90deg);-webkit-transform: rotate(90deg);-ms-transform: rotate(90deg);padding:6px 2px;font-weight:bold;">'+title+'</div>');
};

3  General Category / General Discussion / Re: How to empty a datagrid? on: July 03, 2012, 08:31:33 AM
The 'deleteRow' method require a 'index' parameter that represent the row index. Please pass a correct parameter value while calling this method. The example below shows how to delete all selected rows.

Code:
var rows = $('#tt').datagrid('getSelections');  // get all selected rows
for(var i=0; i<rows.length; i++){
var index = $('#tt').datagrid('getRowIndex',rows[i].id);  // get the row index
$('#tt').datagrid('deleteRow',index);
}

this doesn't work for me... when first row was removed, the index doesn't correspond to the selected rows...

For Example: When you have selected 4 rows (1,2,3,4) and you remove row 1 (index 0) so row 2 becomes now row 1 (index 0) and so on...
For that Reason i push every index first in an array... then sort it and reverse it so that the first index to be removed is the last...
then all lower indexes remain unchanged until you remove it...

so i had to modify it like this below:

Code:
var rows = $('#tt').datagrid('getSelections');  // get all selected rows
var ids = [];
for(var i=0; i<rows.length; i++){
var index = $('#tt').datagrid('getRowIndex',rows[i]);  // get the row index
ids.push(index);
}
ids.sort();  // sort index
ids.reverse();  // sort reverse
for(var i=0; i<ids.length; i++){
$('#tt').datagrid('deleteRow',ids[i]);
}
4  General Category / EasyUI for jQuery / Title in collapsed Layout Panel on: June 29, 2012, 06:13:43 AM
Hi,

Is there a way to set/show the Title in a collapsed Layout Panel?

When collapsed east or west panel the Title should be visible rotated 90 degrees like in ExtJS
In north, south and Center Panel the Title should be visible like when its expanden...



Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!