Problem with hideColumn

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
rads
New User
Posts: 17
Joined: Thu Nov 08, 2018 2:08 am
First Name: Rainer
Last Name: aus dem Spring
Company Name: iks
Zip / Postal Code: 40699
Country: Germany
Contact:

Problem with hideColumn

Post by rads »

Hello everybody,

we want to show/hide columns in a grid depending on parameters from a file. For each column there is a hidden field ShowColXX set to '0' or '1' by the program.

If some of the ShowColxx are set to '1' everything looks fine.
However, if all clumns are hidden, we get the error message:
message.png
message.png (11.3 KiB) Viewed 1143 times
The German message says The last columns cannot be deleted/removed.

Java script used

Code: Select all

var TabShow0 = get("ShowCol0");
var TabShow1 = get("ShowCol1");
var TabShow2 = get("ShowCol2");
var TabShow3 = get("ShowCol3");
var TabShow4 = get("ShowCol4");
var TabShow5 = get("ShowCol5");
var TabShow6 = get("ShowCol6");
var TabShow7 = get("ShowCol7");
var TabShow8 = get("ShowCol8");
var TabShow9 = get("ShowCol9");
var TabShow10 = get("ShowCol10");

if (TabShow0 != "0") {getObj("grdDetailuebersicht").grid.showColumn(0);} else {getObj("grdDetailuebersicht").grid.hideColumn(0);}
if (TabShow1 != "0") {getObj("grdDetailuebersicht").grid.showColumn(1);} else {getObj("grdDetailuebersicht").grid.hideColumn(1);}
if (TabShow2 != "0") {getObj("grdDetailuebersicht").grid.showColumn(2);} else {getObj("grdDetailuebersicht").grid.hideColumn(2);}
if (TabShow3 != "0") {getObj("grdDetailuebersicht").grid.showColumn(3);} else {getObj("grdDetailuebersicht").grid.hideColumn(3);}
if (TabShow4 != "0") {getObj("grdDetailuebersicht").grid.showColumn(4);} else {getObj("grdDetailuebersicht").grid.hideColumn(4);}
if (TabShow5 != "0") {getObj("grdDetailuebersicht").grid.showColumn(5);} else {getObj("grdDetailuebersicht").grid.hideColumn(5);}
if (TabShow6 != "0") {getObj("grdDetailuebersicht").grid.showColumn(6);} else {getObj("grdDetailuebersicht").grid.hideColumn(6);}
if (TabShow7 != "0") {getObj("grdDetailuebersicht").grid.showColumn(7);} else {getObj("grdDetailuebersicht").grid.hideColumn(7);}
if (TabShow8 != "0") {getObj("grdDetailuebersicht").grid.showColumn(8);} else {getObj("grdDetailuebersicht").grid.hideColumn(8);}
if (TabShow9 != "0") {getObj("grdDetailuebersicht").grid.showColumn(9);} else {getObj("grdDetailuebersicht").grid.hideColumn(9);}
if (TabShow10 != "0") {getObj("grdDetailuebersicht").grid.showColumn(10);} else {getObj("grdDetailuebersicht").grid.hideColumn(10);}
Any idea anybody?

Rainer
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests