https://antibiotiqueaugmentin.com/surdosage-augmentin-bebe/
× Welcome to the ToolsJX forum!


Searchable but hidden column

  • saabeirik
  • saabeirik's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 11 months ago #2172

I've just bought and installed/set up Table JX, and it's working close to perfect, according to my expectations. I love this extension :)

But there is one little feature I really want, and I'm not sure if there is a way to obtain it!

I have a table for available car colors based on model year. See example below:

CarColorModel year[VISIBLE]Model year[HIDDEN but searchable]
900Green1990-19941991 1992 1993 1994
900Black1988-1989, 19921988 1989 1992
9000Blue1996-19971996 1997


I'm using the advanced search filters. I want to search for model year in the hidden column, for best functionality. But I want the other "Model year" column to be shown. I've set the hidden column to "unused" but that also makes it unsearchable of course.

I'm sure you understand what I'm thinking of! :) Is there any way to do this?

If so, could you point me in the right direction? Thanks in advance for any tips!

Please Log in or Create an account to join the conversation.

More
10 years 11 months ago #2173

Hi,

if you are familiar with css, I suggest hiding a column using css. Each column and each header has defined a css class. All you need to do is to define two new css rules in your template's css file, and hide the column and the header by using

display:none;

You can find out what is the name of the class if you click on the element with the right click and than select "Inspect Element" if you are using Chrome. There must be similar tools in other browsers. However the classnames are constructed this way:

.tableJX[id][column name]
.tableJX[id]header[column name]

where [id] is id of the grid configuration and [column name] is the column name in database

Further I suggest the usage of "Advanced Filters" option which you can find in the "Search Form" area in the backend. This gives you the ability to select which columns can be searched.

I think this would be the easiest way to achieve described functionality. Other options would have to include some source code modifications.

Please Log in or Create an account to join the conversation.

  • saabeirik
  • saabeirik's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 11 months ago #2174

I tried to hide the column in my css-file.

table id: 2_pj
Column name: Code

This is the code I added to my CSS. It doesn't seem to work. Am I doing this wrong? :)

.tableJX2_pjCode display:none;
.tableJX2_pjheaderCode display:none;

Please Log in or Create an account to join the conversation.

More
10 years 11 months ago #2175

If "Code" is the name of the column in your database than it should be like this:

.tableJX2Code{
   display:none;
}
.tableJX2headerCode{
   display:none;
}

As said before you can also check the class names with some web development tool, or try to find them in the html source code.

Last edit: 10 years 11 months ago by tomaz.
The following user(s) said Thank You: saabeirik

Please Log in or Create an account to join the conversation.

  • saabeirik
  • saabeirik's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 11 months ago #2177

Thank you, this worked perfectly!

Please Log in or Create an account to join the conversation.

Moderators: tomaz
Time to create page: 0.160 seconds

Contact Us

Contact us on Discord

Contact us on Facebook