I am using TreeList for setting permissions. It seemed a perfect choice until I realized that state of ALL the checkboxes is set to either true or false.
I would like to be able to select checkbox based on the value of record i.e. to be able to save it's state in database, retrieve it, and batch update it.
I know that this behavior can be simulated / achieved by using javascript, but it would be so much better, easier and neater to have it data bound just like all the other columns.
For example, I have an organisational structure on the picture below. We can set permissions on any level.
I imagine that the syntax could be something like:
@(Html.Kendo().TreeList<OrgStrukturaTree>()
.Name("treeOrgRO")
.Columns(columns =>
{
columns.Add().Selectable(true).Width("20px");
columns.Add().Field(e => e.Opis).Width(250);
})
.Filterable(false)
.Sortable(true)
.DataSource(dataSource => dataSource
.Read(read => read.Action("ObjektiTree_Read", "Admin"))
.ServerOperation(false)
.Model(m => {
m.Id(f => f.Id);
m.ParentId(f => f.ParentId);
m.Expanded(true);
m.Selected(f => f.Selected);
m.Field(f => f.Opis);
})
)
)
I sincerely hope you would consider this update, as I cannot think of a scenario when I would use checkboxes that are all the same state.
Thank you in advance.