EasyUI Forum
April 20, 2024, 06:15:36 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: [SOLVED] Datagrid: how to merge two columns in one  (Read 5670 times)
danny36
Newbie
*
Posts: 9


View Profile Email
« on: July 24, 2017, 05:52:54 AM »

I have a datagrid with some columns, I want to merge two cols in one for better mobile reading. How to?

For example my data {id: 1234, name: john, surname: doe, address: mmmmm, email: mmmmmm}

I want to display name and surname separated by <br> in one col.
« Last Edit: July 25, 2017, 01:48:47 AM by danny36 » Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: July 24, 2017, 03:32:09 PM »

Please call 'mergeCells' method to merge the datagrid cells. Here is the example shows how to use this method.

https://www.jeasyui.com/demo/main/index.php?plugin=DataGrid&theme=material&dir=ltr&pitem=Merge%20Cells%20for%20DataGrid&sort=
Logged
danny36
Newbie
*
Posts: 9


View Profile Email
« Reply #2 on: July 25, 2017, 01:48:24 AM »

I have resolved in different way, I use formatter of a field. In the result of formatter I have a row with all available data so I can show name+surname in the same cell.
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!