0

I have a checkbox column using ui-grid after I check one column and sort with another column for example age, the active column is not being resorted.

This is a plunkr of the problem

http://plnkr.co/edit/Q3Fs3XiRBpqkzKdZlGXW?p=preview

4
  • 1
    We (atleast I) cannot understand you... Commented May 12, 2015 at 10:02
  • please see the plnkr , what i am trying to say is when i check the active button of the first row for example and then i sort my grid with the age column the checked active button is always on the first row Commented May 12, 2015 at 10:04
  • Ya, I'm doing it right now Commented May 12, 2015 at 10:05
  • to see the problem do this 1.open plnkr 2.check the first row active checkbox 3.sort the grid using the age column 4.you will notice that checked active column is still on the first row even after sorting Commented May 12, 2015 at 10:23

1 Answer 1

2

You have a problem with your cell template. You are not binding the value isActive to the checkbox.

Change the checkbox column to this

{ 
name: 'isActive', 
displayName: 'Active', 
type: 'boolean',
cellTemplate: '<input type="checkbox" ng-model="row.entity.isActive">'
}

This plnkr works right. http://plnkr.co/edit/PL7HvK1FY2ycuOrBbBTA?p=preview

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

Comments

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.