This question is locked. New answers and comments are not allowed.
I want a grid with three main columns and the rest of the data in the detail view. I created adetail view with a table displaying everything and I got nothing. So I slimmed it down figuring to determine where I screwed up... But even with this simple ClientTemplate I get empty detail views:
The data in the grid is fine. Only the detail view is empty. How do I troubleshoot this? Thanks.
J
@(Html.Telerik().Grid<DisplayAssetEntryViewModel>() .Name("AssetGrid") .BindTo(@Model.AssetEntries) .Columns(columns => { columns.Bound(c => c.AssetClass).Width(200); columns.Bound(c => c.AssetSector).Width(200); columns.Bound(c => c.Description); }) .DetailView(detailView => detailView.ClientTemplate("<#= Shares #>")) .Scrollable())The data in the grid is fine. Only the detail view is empty. How do I troubleshoot this? Thanks.
J
7 Answers, 1 is accepted
0
Hello Jerry,
Rosen
the Telerik team
When server binding is used as in your case, you should declare a server Template instead of ClientTemplate.
Regards,Rosen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Jerry
Top achievements
Rank 1
answered on 28 Sep 2011, 07:55 PM
Perfect... Got that working. Is it possible to format data in a client template?
If I wanted the Cost, in the snip above, to be formatted as a dollar amount, can that be done in the client template?
Thanks.
J
"<td class="t-last"><#= Cost #></td>"If I wanted the Cost, in the snip above, to be formatted as a dollar amount, can that be done in the client template?
Thanks.
J
0
Accepted
Hi Jerry,
Regards,
Rosen
the Telerik team
You may use telerik.formatString method to apply formatting:
<#= $.telerik.formatString('{0:c}', Cost) #>Rosen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Jerry
Top achievements
Rank 1
answered on 29 Sep 2011, 06:25 PM
Thanks! Where do I find documentation for this and other available function calls? Searching the online documentation only finds references to calls like this as part of small examples, no documentation of the function call itself.
Thanks.
J
Thanks.
J
0
Hi Jerry,
Rosen
the Telerik team
I'm afraid that the method in question is not currently documented. Please excuse us for the inconvenience.
Regards,Rosen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Jerry
Top achievements
Rank 1
answered on 11 Oct 2011, 07:53 PM
Do the format string specifiers map to standard javascript specifiers?
Thanks.
J
Thanks.
J
0
Hello Jerry,
Rosen
the Telerik team
Could you please elaborate more on what you mean by "standard javascript specifiers"? The supported formats have close resemblance to the ones used in .NET framework.
All the best,Rosen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now