Title: how to get the field name inside an styler function? Post by: r2ferna on June 16, 2015, 06:49:42 PM Hi:
I am adding some fields (31) to a datagrid. They are added dynamically depending on user inputs. I want to use just one styler function for all the 31 fields, but I need the field-name to make decisions inside the styler code. The styler function recives only three parameters: value: the field value. rowData: the row record data. rowIndex: the row index. How can I send the field-name? I have tried the next with no luck: Code: function modificaGrid(){ with this code: Code: styler:function local_tehStyler(value,row,index,campo){console.log('inside styler: ', campo);}, The styler function is something like: Code: function local_tehStyler(value,row,index,campo){ MTIA. Title: Re: how to get the field name inside an styler function? Post by: r2ferna on June 18, 2015, 05:35:03 PM Forget it guys, I was lost. It is so easy:
Code: this.field :-[ Bye. |