cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Register to attend Discovery Summit 2025 Online: Early Users Edition, Sept. 24-25.
  • New JMP features coming to desktops everywhere this September. Sign up to learn more at jmp.com/launch.
Choose Language Hide Translation Bar
BabyDoragon
Level II

How can I interact with the table in data table box()?

How can I interact with the table in data table box()? For example, when I want to select a specific cell, the table displayed by data table box() cannot be selected. How should I modify it so that I can select a cell within the table shown by data table box()?
In the JSL script below, is it possible to manually select the cell where KAITE's Age is 12? Like the selection shown in the image below.
The purpose of doing this is to allow users to select the desired cell, so that the cell value can be modified later.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
New Window( "Example", Data Table Box( dt ) );
111.png
 
1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: How can I interact with the table in data table box()?

Data Table Box is in reality Table Box with Data Table Col Boxes, so I think you might be limited to row selections. You could try using Data Grid Box()

-Jarmo

View solution in original post

6 REPLIES 6
jthi
Super User

Re: How can I interact with the table in data table box()?

Data Table Box is in reality Table Box with Data Table Col Boxes, so I think you might be limited to row selections. You could try using Data Grid Box()

-Jarmo
BabyDoragon
Level II

Re: How can I interact with the table in data table box()?

When using Data Grid Box(), is it possible to automatically close the left panel upon display? As shown in the image below.
111.png

Re: How can I interact with the table in data table box()?

@BabyDoragon 

You can close the side panels of the data grid box or data table with << close side panels

dt = Open( "$SAMPLE_DATA/Tablet Measurements.jmp" );
new window( "data grid box",
	dgb = data grid box()
);
dgb << set data table( dt );
dgb << close side panels;
dt << close side panels;

 

 

-Scott
jthi
Super User

Re: How can I interact with the table in data table box()?

If you wish to minimize it as much as possible, you will have to:

  • Close side panels
  • Close summary graphs
  • Minimize Row ID Width
Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Tablet Measurements.jmp");

nbw = New Window("data grid box", dgb = Data Grid Box());

dgb << Set Data Table(dt);
dgb << Close Side Panels(1);
dgb << Close summary panels(1);
dgb << Set Row ID Width(15);

I'm not sure if you can make it smaller than 15. You can look for Data Browser Box from Scripting Index to see what can be done.

 

Also depending what you are doing, one option could be to build your own table box with editable cells.

-Jarmo
BabyDoragon
Level II

Re: How can I interact with the table in data table box()?

Based on the following JSL, I have two questions.
(1) Regarding the red marked area in the figure below, is there a way to remove it? I want to display a table that fits just right. The blank margin area around it has no meaningful purpose.

111.png
(2) After pressing "Show Table" in the JSL multiple times, the displayed table area becomes smaller and smaller. How can I keep it fixed at the original size?

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
New Window( "Example",
	button box(
		"Show Table",
		Try( x << delete );
		temp << append( x = Data Grid Box() );
		x << Set Data Table( dt );
		x << Close Side Panels(1);
	),
	temp = V List Box()
);



jthi
Super User

Re: How can I interact with the table in data table box()?

1. You can use Set Width to force width of the table. You might have to do some calculations to get it exactly what you wish it to be.

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
nw = New Window("Example",
	Button Box("Show Table",
		Try(x << delete);
		temp << append(x = Data Grid Box());
		x << Set Data Table(dt);
		x << Close Side Panels(1);
		x << Set Width(420);
	),
	temp = V List Box()
);

2. You can keep it from getting smaller for example by preventing V List Box from auto-stretching (there are also other possibly better options)

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
nw = New Window("Example",
	Button Box("Show Table",
		Try(x << delete);
		temp << append(x = Data Grid Box());
		x << Set Data Table(dt);
		x << Close Side Panels(1);
	),
	temp = V List Box()
);

temp << Set Auto Stretching({0, 0});

-Jarmo

Recommended Articles