see this pic:
sometimes, both columns are blank.
would be nice if in a Render script, I could totally hide those columns. or change the columns to 1px width.
does anyone else get feedback from users about these empty columns?
both buttons have Applicability conditions on them - and its based on a User Right/Access Level, so when a button is missing, the entire column is blank.Hiding entire columns in Query (grid)
Hiding entire columns in Query (grid)
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
Re: Hiding entire columns in Query (grid)
Solution:
Based on an old JT post: https://www.awareim.com/forum/viewtopic ... umn#p36627
And Support's help here: https://www.awareim.com/forum/viewtopic ... 255#p51887
--> JaymerTip
Code: Select all
var a = new AwareApp_SystemValueAction (
"AccessLevel",
null,
function (value) {
console.log(value);
if (value == "OEM" || value == "OEMAdmin" || value == "Cust") {
// widget.hideColumn("ColView"); *NOTE, this doesn't work. left here for example
widget.hideColumn(widget.columns[1]);
widget.hideColumn(widget.columns[0]);
}
},
this,
false);
a.run ();
And Support's help here: https://www.awareim.com/forum/viewtopic ... 255#p51887
--> JaymerTip
Last edited by Jaymer on Sat Nov 02, 2019 10:50 pm, edited 1 time in total.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
Re: Hiding entire columns in Query (grid)
In the code above, you can see this line:
widget.hideColumn("ColView");
Well, if you had a real column named "Name", or "Address" in your grid, then this format of hideColumn works.
Problem is that "Operations with Rows" columns do not get names [that I can see], so I had to hardcode in "hide column 1 & 0".
I tried putting an ID in the button (ie. ColView for ColumnView, and had ColDetails for the Details button) but none of that worked.
Luckily the Kendo docs also had a way to hide them specifically by Col #.
And I still have Aware's applicability condition active, so even if someone was to poke around and show the columns, all they'd get are 2 empty columns, so I don't really see a downside to using this.
widget.hideColumn("ColView");
Well, if you had a real column named "Name", or "Address" in your grid, then this format of hideColumn works.
Problem is that "Operations with Rows" columns do not get names [that I can see], so I had to hardcode in "hide column 1 & 0".
I tried putting an ID in the button (ie. ColView for ColumnView, and had ColDetails for the Details button) but none of that worked.
Luckily the Kendo docs also had a way to hide them specifically by Col #.
And I still have Aware's applicability condition active, so even if someone was to poke around and show the columns, all they'd get are 2 empty columns, so I don't really see a downside to using this.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL