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

server tag in Title

1 Answer 11 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.
thdwlgP
Top achievements
Rank 1
thdwlgP asked on 24 Jul 2010, 08:52 PM
I'm trying to customize the header depending on a language.

Is there a way to customize the header text from server side?
Or a way to place a server tag in the Title?

The control does not seem to recognize this.

<%= Html.Telerik().Grid(Model)
       .Name("Grid")                
       .Columns(columns => {
           columns.Bound(o => o.Name).Title(<%= Resource.GetText("Full Name") %>);
           columns.Bound(o => o.Email);
           columns.Bound(o => o.Phonenumber);
       })
       .Sortable()        
       %>

Also, is there a way to bind the grild with a dataset? Does it always have to bind to a model?

1 Answer, 1 is accepted

Sort by
0
Accepted
Georgi Krustev
Telerik team
answered on 26 Jul 2010, 09:55 AM
Hello thdwlgP,

You can try this:
<%= Html.Telerik().Grid(Model)
       .Name("Grid")               
       .Columns(columns => {
           columns.Bound(o => o.Name).Title(Resource.GetText("Full Name"));
           columns.Bound(o => o.Email);
           columns.Bound(o => o.Phonenumber);
       })
       .Sortable()       
       %>

Because it is C# command and it is in server tag, you do not need new server tag for it.

Kind regards,
Georgi Krustev
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
thdwlgP
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or