EasyUI Forum
April 19, 2024, 01:43:04 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: group datalist + master detail + Group Rows  (Read 6153 times)
catpaw
Jr. Member
**
Posts: 85


View Profile Email
« on: February 15, 2017, 10:17:12 AM »

hello again, to continue with my current proyect wich is a  contacts book, I came up with this:

I have a datalist of contacts and I group the contacts with their first letter of their last name, looks like this (example):

| A                       |
| Aquaman             |
| B                       |
| Batman               |
| C                       |
| Captain America   |

then I want to be able to open a contact, and see his details like number, email, ...
so I added the master detail for the datagrid and totally works, but the formatter take away the agrupation fo datalist, and now look like this:

| + Aquaman             |
| + Batman               |
| + Captain America   |

I just need the agrupment returns, please, this my code:

Code:
<div id="dt" class="easyui-datalist" style="height:450px;" data-options="
                            url: 'retrieve/get_list_contactos.php',
                            method: 'get',
                            lines: true,
                            groupField: 'group',
                            view: detailview,
                            detailFormatter: dtFormatter,
                            onExpandRow: getDetails
                       ">
<script type="text/javascript">
function dtFormatter(index,row){
return '<div class="ddv" style="padding:5px 0"></div>';
}
function getDetails(index,row){
var ddv = $(this).datagrid('getRowDetail',index).find('div.ddv');
ddv.panel({
height:80,
border:false,
cache:false,
href:'retrieve/get_details_view.php?id_contacto='+row.id_contacto,
onLoad:function(){
$('#dt').datagrid('fixDetailRowHeight',index);
}
});
$('#dt').datagrid('fixDetailRowHeight',index);
}
</script>

there is a way to return the agrupment?
I dont want to use the Group Rows in DataGrid
I want to keep te group for datalist

thanks
« Last Edit: February 16, 2017, 07:57:42 AM by catpaw » Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: February 15, 2017, 06:16:00 PM »

Please look at this example http://code.reloado.com/iwekaj3/edit#preview.
Logged
catpaw
Jr. Member
**
Posts: 85


View Profile Email
« Reply #2 on: February 16, 2017, 07:40:45 AM »

hello jarry,


I saw your example, thank you

But is just how I have now, my issue is that before I implement the master detail (datagrid), the rows were agrup with the Group DataList, after, the agrupment not showing anymore

the question here was, how I show the group functionality of datalist and keeping the master detail view?

or how to combine master detail + group rows on datalist?
« Last Edit: February 16, 2017, 07:58:59 AM by catpaw » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!