Title: How to change a datgrid column title? Post by: Juan Antonio Martínez on August 16, 2016, 11:16:00 AM Hi all,
I want to change the title in a datagrid column according context. I've tried this code, but no luck: Code: function changeTitle(dg,field,title) { What am I doing wrong? What's the right way (tm) to change column title in a datagrid Thanks in advance Juan Antonio Title: Re: How to change a datgrid column title? Post by: wade.zhu on August 16, 2016, 10:25:06 PM try my code ;)
Code: function changeColumnTitle(dg, field, title) { Title: Re: How to change a datgrid column title? Post by: Juan Antonio Martínez on August 17, 2016, 06:52:05 AM Works great, thanks.
Anyway to make sure new title is reflected in 'options', and to add as a dg method, i made a little change: Code: $.extend($.fn.datagrid.methods, { Perhaps now not too much complicated elaborate a more generic 'setTitles' method :-)... but out of my scope. Thanks for the code Juan Antonio |