This question is locked. New answers and comments are not allowed.
Hi,
I am trying to do this:
However the title fails as it does not interpret the code.
Is there anyway to apply dynamic titles based upon the model data like this? Essentially the code above loops over each CompanyTechnologyRecovery object it finds, create a column for it but I also want it to create a dynamic title.
The data will always have the exact same number fo columns witht he exact same order of company technologies
Thanks for any help
Colin
I am trying to do this:
.Columns(columns => { Action<int> addValueColumn = (i) => { columns.Bound(u => u.CompanyTechnologyRecoveries[i].Required).ClientTemplate("<input type='checkbox' disabled='disabled' name='CTR<#= CompanyTechnologyRecoveries[" + i + "].CompanyTechnologyRecoveryId #>' <#= CompanyTechnologyRecoveries[" + i + "].Required? \"checked='checked'\" : \"\" #> />").Width(140).Title("<#= CompanyTechnologyRecoveries[" + i + "].CompanyTechnologyName #>").Filterable(false); }; columns.Bound(u => u.CriticalProcessName).Width(140).ReadOnly(true); columns.Bound(u => u.LocationName).Width(140).ReadOnly(true); columns.Bound(u => u.RecoveryPhaseName).Width(140).ReadOnly(true); for (int i = 0; i < Model.FirstOrDefault().CompanyTechnologyRecoveries.Count; i++) { addValueColumn(i); } columns.Command(commands => { commands.Edit(); //commands.Delete(); }).Width(180).Title("Commands"); })However the title fails as it does not interpret the code.
Is there anyway to apply dynamic titles based upon the model data like this? Essentially the code above loops over each CompanyTechnologyRecovery object it finds, create a column for it but I also want it to create a dynamic title.
The data will always have the exact same number fo columns witht he exact same order of company technologies
Thanks for any help
Colin