EasyUI Forum
May 16, 2024, 05:14:50 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
1  General Category / EasyUI for jQuery / Re: index of a selected row with duplicate content in datagrid on: November 22, 2013, 12:17:19 PM
How to get the row object?
2  General Category / EasyUI for jQuery / Re: index of a selected row with duplicate content in datagrid on: November 18, 2013, 10:23:27 AM

This doesn't address the identical entries problem, as the 'getSelections' would return the rowData instead of the object.

Quote
Code:
var selections= dg.datagrid('getRowIndex',dg.datagrid('getSelections')));
var ids = [];
$.each(Selections, function(i, e){
    var index = dg.datagrid('getRowIndex', e);
    if(ids.contains(e.id)){
       console.info('exists index -->>' + index)
    }else{
      ids.push(e.id);
   }
});

3  General Category / EasyUI for jQuery / Re: index of a selected row with duplicate content in datagrid on: November 12, 2013, 08:59:32 AM
Thanks, but how to get the row object of the selected row? Couldn't find it in the doc.  'getSelected' only returns the rowData.   


Calling 'getRowIndex' method will return the specified row index. What you need to do is to pass the row object to this method.
Code:
var row = ...;  // the row object
var idx = $('#dg').datagrid('getRowIndex', row);
alert(idx);

Btw,  the documentation said the following, so I guess it needs to be updated:
getRowIndex   row   Return the specified row index, the row parameter can be a row record or an id field value.
4  General Category / EasyUI for jQuery / Re: index of a selected row with duplicate content in datagrid on: November 11, 2013, 03:48:38 PM
Hello?
5  General Category / EasyUI for jQuery / index of a selected row with duplicate content in datagrid on: November 08, 2013, 01:42:57 AM
This was asked by someone but the answer like the following does not serve my purpose...
Code:
var dg=$('#dg');
var selected = dg.datagrid('getRowIndex',dg.datagrid('getSelected')));

So I have a table that has two identical records in it.  When the second identical record is selected ,  I want to get its index, not the first one.  The code above will give me the first index instead.   I know I could have used a unique id field but that adds to complexity and I am almost sure there is a simple method to just get index of THE selected row.   Just couldn't find it in the documentation page... Help


6  General Category / EasyUI for jQuery / Show title of a collapsed layout panel on: October 24, 2013, 02:12:07 PM
The panel was initialized as collapsed='true',  but the title is not showing up in the title bar area (only empty space that does not give a clue what it might be). 
Code:
  <div data-options="region:'north', split:true" title="Edit Your information" style="height:180px" collapsed="true">

I tried the code from another thread as the following:

Code:
var p = $('#maincontainer').layout('panel','north').panel({
onCollapse:function(){
var title = $('#maincontainer').layout('panel','north').panel('options').title;  // get the north panel title
var p = $('#maincontainer').data('layout').panels['expandNorth'];  // the north expand panel
p.html('<div>'+title+'</div>');
}
});

but it did not work even after the page loaded. 
7  General Category / EasyUI for jQuery / Re: How to set layout panel being closed at initialization? on: October 23, 2013, 02:21:03 PM
Thx. It works but the panel title disappeared after the initialization. 
8  General Category / EasyUI for jQuery / How to set layout panel being closed at initialization? on: October 22, 2013, 12:43:16 AM
I tried something like  $('#cc').layout('collapse','west'). It works but it still shows the panel content for a little bit.   
Using $('#cc').layout('panel','east').panel('collapse','true');  would make the display a little messed up .  Any suggestions?

Another question, where do I set the animation easing option for the layout panel closing/opening and can each panel have different settings?

TIA!


9  General Category / EasyUI for jQuery / Change linkbutton text on: August 21, 2013, 12:26:42 PM
It's probably super easy but I thought I'd ask:

How to change the linkbutton text after it has been created?
10  General Category / EasyUI for jQuery / Accordion: set panel to be uncollapsible on: August 20, 2013, 08:00:20 AM
I guess I need to start a new topic to ask another question:

how to set one of panels to be uncollapsible, either at initialization or the user wants to 'anchor' it.  I understand this may change the height of the accordion area, but is it doable?
11  General Category / EasyUI for jQuery / Re: Accordion: change title text on Collapse and on: August 14, 2013, 11:11:00 PM
Worked!  Also added onExpand the same way.  Thanks a lot!

Another question here: how to set one panel to be uncollapsible, either at initialization or the user wants to 'anchor' it
12  General Category / EasyUI for jQuery / Accordion: change title text on Collapse and on: August 14, 2013, 08:01:04 AM
Searched but did not find similar questions.   I found onCollapse event listed in the Panel events so I assume it is inherited in Accordion.  However I tried the following with no luck:

Code:
$('#spouse_info').accordion({
border: false,
onCollapse: function(title){
$('#spouse_info').accordion('setTitle',"Click to expand");
}
});

13  General Category / EasyUI for jQuery / Re: slider: is it possible to click on the ruler and let the handle moves with it? on: July 22, 2013, 11:56:05 AM
Cool!  Thanks for the quick replies.   

The 'onSlideEnd' event only fires when the user has dragged the slider's thumb and drop it. Please try to use the 'onComplete' event that will get always called, no matter dragging the thumb or clicking the slider.
Code:
$('#ss').slider({
  onComplete:function(value){...}
});
14  General Category / EasyUI for jQuery / Re: slider: is it possible to click on the ruler and let the handle moves with it? on: July 21, 2013, 02:50:49 PM
Thanks. The next question follows is that how do I use these click events?  I would like to use the onSlideEnd instead of onChange for my app because the latter triggers too many ajax requests, but was unable to get it working.
15  General Category / EasyUI for jQuery / Re: slider: is it possible to click on the ruler and let the handle moves with it? on: July 21, 2013, 07:44:34 AM
Where should I put this file on disk and how to include in the header? 

By itself the slider does not render and using it together with the 'jquery.easyui.min.js' doesn't make a difference.
I am also using other elements like tooltips etc.
Pages: [1] 2
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!