EasyUI Forum
May 07, 2024, 11:39:53 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: Expand row in DataGrid with subgrid  (Read 9938 times)
crosemffet
Jr. Member
**
Posts: 68



View Profile WWW Email
« on: December 09, 2012, 03:48:08 PM »

let's imagine this situation:
I have one grid with 10 rows.
only row 2 and 5 has data to show in the subgrid, if expanded.
there's any chance that the plus sign at left of the grid shows only in the rows that has expanded data, and the rest doesn't show?
in other words, only row 2 and 5 with the plus sign (+) and the rest without it ?
thanks in advance
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: December 10, 2012, 01:10:56 AM »

To hide the expander icon, try the following code:
Code:
var expander = $('#dg').datagrid('getExpander', 2);  // get the third row expander, the row index start with 0
expander.hide();
Logged
brettjw
Newbie
*
Posts: 4


View Profile
« Reply #2 on: October 17, 2013, 08:13:13 AM »

@stworthy - I am using the subgrid code directly from the website demo and I was wondering if there was a way to do this that would be more dynamic - meaning that if the subgrid query did not have any results then it hide the expander. I have tried to implement this example and could not get it to work- it may be my lack of knowledge about EasyUI, but if you could provide a example that shows this code in line with the demo - that would be great. Thanks for your support. I have been looking for the subgrid option for years and I am very excited to implement it, just need to get a few things working.

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