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

[Solved] GridColumnSettings and ClientTemplate

1 Answer 161 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.
Mike Labadie
Top achievements
Rank 1
Mike Labadie asked on 16 Mar 2011, 06:20 PM
Can I get an example of how to use the ClientTemplate member of GridColumnSettings to set the grid columns in the controller?

I'm trying to do exactly what is shown here, except that I want to use a ClientTemplate as well:  http://demos.telerik.com/aspnet-mvc-beta/grid/columnsettings.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Alok
Top achievements
Rank 1
answered on 17 Mar 2011, 12:51 PM

 

var columnSettings = new List<GridColumnSettings>()

 

 

{

 

 

new GridColumnSettings

 

{

Member =

"TerritoryCode",

 

Groupable =

true,

 

 

ClientTemplate =

"<a href='strCode=<#= TerritoryCode #>'' class='t-link'><#= TerritoryCode #></a>" ,

 

 

 

 

},

 

 

new GridColumnSettings

 

{

Member =

"TerritoryDescription",

 

ClientTemplate =

"<a href='strCode=<#= TerritoryCode #>' class='t-link'><#= TerritoryDescription #></a>" ,

 

 

},

 

 

 

 

new GridColumnSettings

 

{

Member =

"TerritoryCode",

 

Filterable =

false,

 

 

Groupable =

false,

 

 

ClientTemplate =

"<a href='strCode=<#= TerritoryCode #>' class='t-link'><img src='../../images/edit.gif'></a>" ,

 

 

}


Tags
Grid
Asked by
Mike Labadie
Top achievements
Rank 1
Answers by
Alok
Top achievements
Rank 1
Share this question
or