This is a migrated thread and some comments may be shown as answers.
Format bound column on more than one field
0 Answers 17 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jack
Top achievements
Rank 1
Jack asked on 20 Oct 2010, 07:05 PM
I have a Telerik Grid that I want to use Ajax binding on. My model comes from a resource (.resx) file that is parsed(to a custom resource class). The problem is that I have a language parameter that is passed to the view as ViewData["language"] If I write this to the page I confirm that it does contain the current language selected.

My problem is that the grid may hold a list of data for any language and I need to call a javascript function in the grid that will pass the name of the resource as well as the language. I cannot use a template because it does not support Ajax binding. The current syntax with the language hard-coded as "pt" is:
columns.Bound(r => r.name).Format("<a href='javascript:void(0)' onclick=showResource('{0}','pt');>Edit</a>")
and at the top of the view I have:
Resources for (<%= ViewData["language"] %>)

How do I get the grid to inject the language?

Thank you
Jack
Tags
General Discussions
Asked by
Jack
Top achievements
Rank 1
Share this question
or