0

I am using angularjs 1.4.9 and ui-grid 3.1.1

I have used external scope (grid.appScope) to access a function to get value from a cell in grid but I can not get the right value.

The plunker: plnkr.co/edit/f0c24q5w9Fbx9ap1XUG7?p=preview

If we click on image of Product 01 to Product 05 we can get the right value, the image will display normally, but if we click on image of Product 20 - Product 23 we can not see the right image.

If we click on one cell (use the cellNav feature) and click on the button "Get current focus cell" we always get the right value.

So how can I get the true value through grid.appScope?

1 Answer 1

1

The issue is that the items beneath the visible table have a VERY hard time keeping up. Try this plunkr

The code that changed:

var imageTemplate = '<div class="ui-grid-cell-contents" ng-if="!!row.entity.image" style="text-align: center">'
  + '<img ng-src={{row.entity.image}} width="50px" height="50px" ng-click="grid.appScope.addImage(row.entity.image)"/></div>';

[note I removed the quotes]

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you. I'm so surprised when it cause by the quote =.='

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.