EasyUI Forum
November 30, 2025, 05:32:32 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: [SOLVED] pivotgrid frozencolumntitle  (Read 7494 times)
jega
Full Member
***
Posts: 228


View Profile
« on: January 16, 2019, 01:37:52 AM »

Hi

Have a strange problem

fct gives me the top row name. Need to put this in frozencolumntitle, but in code below the onLoadSuccess goes into loop

$('#pg').pivotgrid({
   onLoadSuccess: function(){
      $('#pg').pivotgrid('collapseAll');
      var opt = $('#pg').pivotgrid('options');
      var rows = opt.pivot.rows;
      var fct = rows[0];
      console.log(fct);
      $(this).pivotgrid({frozenColumnTitle:'<span style="font-weight:bold">'+fct+'</span>'})
   },
})

Any help

Regards
Jesper
« Last Edit: January 16, 2019, 01:19:26 PM by jega » Logged
jarry
Administrator
Hero Member
*****
Posts: 2302


View Profile Email
« Reply #1 on: January 16, 2019, 05:48:06 AM »

Please try to use this code instead.
Code:
var title = $(this).data('datagrid').dc.header1.find('.datagrid-cell>span:first');
title.html('<span style="font-weight:bold">'+fct+'</span>');
Logged
jega
Full Member
***
Posts: 228


View Profile
« Reply #2 on: January 16, 2019, 01:18:15 PM »

Thanks for quick reply.

Works great.

Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!