EasyUI Forum
March 29, 2024, 06:52:45 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 destroy  (Read 3915 times)
jega
Full Member
***
Posts: 190


View Profile
« on: January 18, 2019, 02:52:16 AM »

Have this

<table id="dg"></table>

On click showButton

var dg = $('#dg').datagrid({
   url:'getfromdb.asp?st=logon',
   columns:[[
   {field:'logonUser',title:'BrugerID',width:100},
   {field:'counter',title:'Antal',width:100},
   {field:'lastLogon',title:'Seneste logon',width:120}
   ]]
})

But how to have a closeButton to destroy the datagrid, to later create it again with showButton


Logged
battlezad
Newbie
*
Posts: 44


View Profile
« Reply #1 on: January 18, 2019, 02:55:33 AM »

Why to destroy? Why not put in div and hide/show div contents?

Logged
jega
Full Member
***
Posts: 190


View Profile
« Reply #2 on: January 18, 2019, 03:06:12 PM »

Yes it can be done with div, but if it could be destroyed and not use any memory, i think.

The panel in datagrid can be destroyed, so far so good, but then i can't create the datagrid again, only after refresh page.

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!