cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

How to hide a listView control column

Jump to solution

I need to hide the edit column in a list view control, I have using a view in the list to display the column in a listView contorl. The idea is to to hide the column based on condition on form load.

I have tried this NWF$("div[name='Edit']").hide();

but it only erase that text not the column.

thanks

Labels: (1)
0 Kudos
Reply
17 Replies
Workflow Hero

Re: How to hide a listView control column

Jump to solution

try following

NWF$('.myLV table.ms-listviewtable th:nth-of-type(4)').hide();
NWF$('.myLV table.ms-listviewtable td:nth-of-type(4)').hide();‍‍

this hides 4th column in listview control

listview control‌

Reply
Workflow Hero

Re: How to hide a listView control column

Jump to solution

Great!!, Thank you Marian. It worked.

Reply
Workflow Hero

Re: How to hide a listView control column

Jump to solution

Hi Marian,

The above code used to work on Nintex From 2.11.1.0 and now it is upgraded to 2.11.4.20 and the header is not showing at all. The listview header text is hidden but the header row is visible. I can see the sort arrow.

0 Kudos
Reply
Workflow Hero

Re: How to hide a listView control column

Jump to solution

I'm sorry, I do not have installed that release yet....

could you post a screenshot how is exactly look like?

and how does control's DOM looks like?

0 Kudos
Reply
Workflow Hero

Re: How to hide a listView control column

Jump to solution

Thanks Marian,

Actually I am hiding the first column, but if I hide second or other columns the heading appears. Below is the screen shot when I hide the first column.

Here is the first column DOM

Here is the listview DOM

0 Kudos
Reply
Workflow Hero

Re: How to hide a listView control column

Jump to solution

hm, from your screenshots, selector up to: NWF$('.myLV table.ms-listviewtable') should still work (based on 'listview DOM'). unfortunately, but I do not see what's going on further  down the tree...

form the 'first column DOM' screenshot I'm not able to identify where exactly this snippet is from - how deep within 'ms-listviewtable' it is.

and from very first screenshot of  how does hidden column looks like, it looks like to me there is something (dropdown/filter??) what haven't used to be there before (or at least I haven't experienced it yet).

so it looks to me overall listview DOM has changed, but from screenshots provided I'm not able to identify the whole tree.

0 Kudos
Reply
Workflow Hero

Re: How to hide a listView control column

Jump to solution

Thanks for your time Marian,

Just attaching another screen shot, hope it gives you the full view of the tree, thanks for the help.

0 Kudos
Reply
Workflow Hero

Re: How to hide a listView control column

Jump to solution

that still seems to be too less.

could you copy out whole (sub)tree from DIV.LVSession and attach it as a text snippets? 

0 Kudos
Reply
Workflow Hero

Re: How to hide a listView control column

Jump to solution

Hi Marian,

Attaching the file along with this. Let me know if have not received.

Regards and thanks.

Sojan

0 Kudos
Reply