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

kendo.toString Syntax for shared popup editor

1 Answer 94 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Emily
Top achievements
Rank 1
Emily asked on 20 Jun 2016, 04:42 PM

I have a custom popup editor that's used as the editor in a parent grid and in the nested grid of another parent grid:

Grid 1 -> Shared Custom Popup
Grid 2 >Tabstrip > Nested Grid -> Shared Custom Popup

In the popup editor, I have a field "created_date" that I need to display as a string instead of an editor box. I know that for popup editors of a parent grid, I  need to use this syntax:

${kendo.toString(created_date, "MM/dd/yyyy hh:mm tt")}

And for popup editors of a nested grid, I need to use this syntax:

#= kendo.toString((created_date), "MM/dd/yyyy hh:mm tt") #

The syntax for popup editors of a parent grid won't work for the popup editors of a nested grid and vice versa.

How would I display a string for a field in a popup editor that's shared between a parent grid and the nested grid of another parent grid?

1 Answer, 1 is accepted

Sort by
0
Danail Vasilev
Telerik team
answered on 22 Jun 2016, 10:27 AM
Hi Emily,

You can try to use a common JavaScript function that will return the proper template based on the grid that calls it.

If, however, you are still having issues on the matter it would be better to create a basic dojo example with this scenario and then send it back to us, so that we can examine it locally.

Regards,
Danail Vasilev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Emily
Top achievements
Rank 1
Answers by
Danail Vasilev
Telerik team
Share this question
or