crunch
crunch

Reputation: 375

Kendo grid jQuery animate() issue

I'm having an issue with a kendo grid that has a child grid inside the detailInit();

demo: kendo dojo

When a user opens the details area for a row, I scroll the row to the top and open it:

// animate the scroll
this.element.find(".k-grid-content").animate({
scrollTop: distance
}, 400);

my problem is the grid inside the detailInit is also scrolling, so I thought, np, just define the selector a little tighter..

I tried:

.find("#grid > .k-grid-content")

and others, but it won't allow it to scroll, etc...

Any ideas? Thank you!

Upvotes: 0

Views: 102

Answers (1)

DontVoteMeDown
DontVoteMeDown

Reputation: 21465

Almost there. When you use #grid > .k-grid-content the selector doesn't returns any element because this.element already is #grid, so there is no #grid under #grid. But there is .k-grid-content under it indeed, so...

this.element.find("> .k-grid-content")

should work for you. Demo.

Upvotes: 1

Related Questions