This question is locked. New answers and comments are not allowed.
Hello,
I have this Model :
I want to Build my telerik Grik and add all the columns from the collection "Test"
All row have the same number of collection "Test", the name is the same and Activated change
Here the grid :
Is it possible ??
How to link the build columns??
Excuse my poor english
Thanks for help
I have this Model :
public class TestModel { public class Def1Ligne { public string Name { get; set; } public int Id { get; set; } public bool Activated { get; set; } public List<Test> Col{ get; set; } } public class Test { public string Name { get; set; } public bool Activated { get; set; } } }I want to Build my telerik Grik and add all the columns from the collection "Test"
All row have the same number of collection "Test", the name is the same and Activated change
Here the grid :
<%: Html.Telerik().Grid<TestModel>((IEnumerable<TestModel >)Model) .Name("resultsGrid") .Columns(columns => { columns.Bound(u => u.Name).Width(50).HtmlAttributes(new { style = "text-align:left" }) .Title("Name"); columns.Bound(o => o.PageActivated).ClientTemplate("<input type='checkbox' name='PageChecked' value='<#= BlocID #>' />") .Title("Activated") .Width(50) .HtmlAttributes(new { style = "text-align:center" }); for (int j = 0; j < Model.Col.Count(); j++) { string sNomCol = Model.Col[j].Name ; columns.Bound(o => o.Model.Col[j].Activated).ClientTemplate("<input type='checkbox' name='FeatCked' value='<#= ID #>' />") .Title(sNomCol) .Width(50) .HtmlAttributes(new { style = "text-align:center" }); } }) .Scrollable() .Footer(true) %>Is it possible ??
How to link the build columns??
Excuse my poor english
Thanks for help