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

[Solved] Grid - Client Template binding problem

0 Answers 19 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sunsern
Top achievements
Rank 1
Sunsern asked on 25 Aug 2011, 01:37 PM
Hi
I have manage to create grid from Asp.net MVC sucessfully but unfortunately I have a hiccup at the client template binding
I am using the normal syntax <#=ContractStatusID#>. I have create a static class which convert ContractStatusID into ContractStatus name and I would like to display the contractStatus name in the client template . In the static class have a function called
public static string  GetContractStatusName( int? contractStatusId) which is use to convert fom id number into text.

I have try the following

.ClientTemplate( Html.DisplayText(

CategoriesStatic.GetContractStatusName(
Convert.ToInt32("<#=ContractStatusID#>"))).ToString())
but some how "<#=ContractStatusID#>"  doesn't seem to work. Is there suppose to be an alternative way of getting the ContractStatusID or another way of converting the function in the client template side

Thanks you in advance and sorry about all these troubles
 

Tags
Grid
Asked by
Sunsern
Top achievements
Rank 1
Share this question
or