Is it possible to change the ListView contorl's column label?

  • 30 November 2017
  • 2 replies
  • 1 view

Badge +10

I have a List View control on the Nintext Form (Ver: 2.11) and I want to rename the column header label instead of SharePoint column name.

Thanks


2 replies

Badge +11

Hi Sojan,

you will need some JS/Jquery to do that. The column headers are inside a DIV with a "name" property where this properties value is just the column name (use browsers DEV tools to inspect the DOM Structure at this point). This will enable you to query the element you want to change.

Something like

$("div[name='ColumnName']").text("WhateverUWant")

Should do the trick.

Cheers

Philipp

Badge +10

Thanks Philipp, It worked.

I was using the below code, it does work sometimes.

NWF$("a.ms-headerSortTitleLink").filter(function () {
var idclm1 = this.id.match(/diidSort[0-9]ColumnName/);
if(idclm1)
{
 NWF$('#'+idclm1).text('Something');
}

});

Reply