apps
apps

Reputation: 333

ui-grid cell changes from outside

i want to make changes to ui-grid cell value from outside , for eg: on page reload. I have to calculate some form textbox value on page reload and update it to ui-grid cell. on conditions like cell edit I can directly access grid cell on event and update the cell value. But how can I access from outside on reload.

This.studentGridApi.grid.rows[1].entity["Name"] 

but it is not accessible from outside. I want to do something like below

This.studentGridApi.grid.rows[1].entity["score"] = This.subjectScore;

Upvotes: 0

Views: 314

Answers (1)

Thecor
Thecor

Reputation: 88

You're referencing your properties incorrectly. It should be like so:

This.studentGridApi.grid.rows[1].entity.score = This.subjectScore;

This can be done in a function or triggered on a page reload so long as the Grid Options and Grid API have loaded beforehand.

Upvotes: 1

Related Questions