Reputation: 23
I'm getting field name using:
var getColumnName = params.colDef.field;
I want to make params.data
to have field which is stored in getColumnName
and set the value null
to make it accessible like:
params.data.name
Upvotes: 0
Views: 37
Reputation: 1236
Use array notation instead of object notation:
if (!params.data) params.data = {};
params.data[getColumnName] = null;
Upvotes: 2