EasyUI Forum
May 17, 2024, 07:45:55 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: datagrid  (Read 5956 times)
Lambert
Newbie
*
Posts: 4


View Profile Email
« on: January 21, 2014, 10:26:01 AM »

Hi,


How do I remove all  of the columns  from a datagrid including the headers?
« Last Edit: January 21, 2014, 10:27:52 AM by Lambert » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: January 21, 2014, 07:13:52 PM »

Why to remove all columns? If no columns are defined, there are no rows to display in datagrid.
Logged
Lambert
Newbie
*
Posts: 4


View Profile Email
« Reply #2 on: January 22, 2014, 02:25:04 AM »

Hi
Please let me explain.

Basically I just want to refresh the data grid including the column headers.

I need to remove all of the columns because I’m designing an interface that allows the user to create a MySQL database. They can then add and remove columns where required.  At the moment I I’m just reloading  the page but this does not look too good.

thanks
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: January 23, 2014, 12:11:39 AM »

Try this to display a datagrid with no columns.
Code:
$('#dg').datagrid({
  columns:[[]]
});

Please refer to this tutorial http://www.jeasyui.com/tutorial/datagrid/datagrid6.php to learn how to dynamic create datagrid columns.
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!