This is a migrated thread and some comments may be shown as answers.

Filtering in a template

3 Answers 59 Views
Templates
This is a migrated thread and some comments may be shown as answers.
Kibo
Top achievements
Rank 1
Kibo asked on 07 Jan 2016, 10:40 AM

I have a hierarchical grid using a template, but I'm unable to figure out the correct way to use a custom filter in the template.

I wrote about it on StackOverflow yesterday, but it won't hurt trying the forums either.

http://stackoverflow.com/questions/34638501/kendo-ui-template-refresh

I don't mind throwing the code around.

The structure of the data I use is this: 

 

[
{
"date": "${Y.m}",
"new": "${new}",
"active": "${active}",
"inactive": "${inactive}",
"clients": [
{
"client_id": "${client_id}"
"administration_name": "${name_of_administration}",
"created_at": "${created_at}",
"updated_at": "${updated_at}",
"is_new": "${new}",
"status": "${status_id}"
}
]
}
}
]

3 Answers, 1 is accepted

Sort by
0
Kibo
Top achievements
Rank 1
answered on 07 Jan 2016, 10:43 AM

Better formatting, somehow the forum doesn't like using tabs, and no edit button. 

[
    {
        "date": "${Y/m}",
        "new": "${new}",
        "active": "${active}",
        "inactive": "${inactive}",
        "clients": [
            {
                "client_id": "${client_id}"
                "administration_name": "${name_of_administration}",
                "created_at": "${created_at}",
                "updated_at": "${updated_at}",
                "is_new": "${new}",
                "status": "${status_id}"
            }
        ]
        }
    }
]

0
Kibo
Top achievements
Rank 1
answered on 07 Jan 2016, 11:09 AM
0
Kibo
Top achievements
Rank 1
answered on 07 Jan 2016, 01:47 PM

Has been fixed, thanks to this SO user.
Instead of detailInit, you're supposed to use dataBound, which works perfect.

Thread can be closed.

Tags
Templates
Asked by
Kibo
Top achievements
Rank 1
Answers by
Kibo
Top achievements
Rank 1
Share this question
or