EasyUI Forum
September 14, 2025, 12:02:14 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: Auto Collapse DatagridView  (Read 14460 times)
Punkerr
Newbie
*
Posts: 37


View Profile
« on: May 03, 2013, 03:12:04 PM »

Hi sworthy!

My question this time is about auto-collapse datagridview. It is possible auto-collapse the last row in gridview mode, when i clicking on another row to expand? or it is possible collapse all rows before expand another??  Huh

Please refer to: http://jsfiddle.net/DQMQ9/

I'll really appreciate your help, thanks!
« Last Edit: May 03, 2013, 04:05:52 PM by Punkerr » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: May 03, 2013, 07:17:31 PM »

Calling 'collapseRow' to collapse the specified row. Here is the updated example http://jsfiddle.net/DQMQ9/7/
Logged
Punkerr
Newbie
*
Posts: 37


View Profile
« Reply #2 on: May 04, 2013, 02:04:24 PM »

Thanks man!! you always helping us, that's a great solution!
« Last Edit: May 04, 2013, 02:18:31 PM by Punkerr » Logged
Punkerr
Newbie
*
Posts: 37


View Profile
« Reply #3 on: May 06, 2013, 07:10:18 AM »

For better solution, I replaced this line:
Code:
if (opts.lastExpandIndex != undefined){
for this:
Code:
if (opts.lastExpandIndex != undefined && index != opts.lastExpandIndex){
It enables re-expand the same row if want it.

Thanks stworthy!
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!