Hi,I am trying to change the defaultValue of an igGrid column. The first default value was set during GridModel definition (on the controller side). After a user click I have to change it in another value.I tried this one:
var columnSettings = $("#grid_id").igGridUpdating("option", "columnSettings");alert(columnSettings[1].defaultValue);
And I can see the right first default value. But if I try to do:
var columnSettings = $("#grid_id").igGridUpdating("option", "columnSettings");columnSettings[1].defaultValue = 12345;
Nothing happened...Or better: if I print (javascript alert) all the column settings I can see the default value of that column changed to the new one, but when I add a new row, the default value of that column still starts as 0 (the very first default value).
Why?
Thanks
Flavio M.
Hello Flavio,Your code looks fine. I wasn't able to reproduce this issue. What version (including build) of Ignite UI are you using?A sample will be very helpful.Best regards,Martin PavlovInfragistics, Inc.
Hi Martin,
Greang a sample project for you when I found the problem. The column of which I was trying to set the default value was a readonly one. I thought that, through javascript, it was possible also to edit a readonly field, but probably I was wrong, beacuse in the sample project I did not put a readonly condition and everything worked right. Of course I tested the same on my actual project and everything works also there.
Sorry for the time you dedicated to this...
PS Anyway, my actual IgniteUI version is 2013.1 2039