Show Posts
|
Pages: [1] 2
|
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. 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. 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.
|
|
|
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... 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). <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: 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.
|
|
|
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!
|
|
|
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: $('#spouse_info').accordion({ border: false, onCollapse: function(title){ $('#spouse_info').accordion('setTitle',"Click to expand"); } });
|
|
|
|