Align more to grid items (since treelist is essentially a grid with parent/child). Need a ForeignKey element to allow for helpers etc. instead of forcing override and manual Templates.
columns.Add().Field(n => n.StatusId).Title("Status").Width(150).Template("#=statustemplate(data)#"); columns.Add().Field(n => n.CategoryId).Title("Category").Width(150).Template("#=categorytemplate(data)#");
ForeignKeys should be treated the same was a grid elements and allow for the UIHint, etc.
Full alignment of the .Add function to .Bound in grid would be nice as well, but naming is as critical as the functionality.
.HtmlAttributes is available to columns, but not to elements such as commands.
columns.Add().Command(command => {
command.CreateChild();
command.Edit();
command.Destroy();
command.Custom().Name("custom").Text("Details").Click("cmdDetails");
command.Custom().Name("change").Text("Change Control").Click("cmdChangeControl");
});
Should work the same as other elements/components and allow:
command.Edit().HtmlAttributes(new { type = "button", @class = "btn btn-primary" }); <- from grid.
I have worked with the grid and have successfully been able to change the update/cancel button text/icon for inline editing using the code below.
commands.Edit().Text(" ").IconClass("fa glyphcolor fa-edit").CancelText(" ").CancelIconClass("fa fa-times").UpdateText(" ").UpdateIconClass("fa fa-check");
For the TreeList the IconClass, CancelText, CancelIconClass UpdateText or UpdateIconClass are not exposed functions. Currently using JQuery and CSS you can workaround this but I would be nice if the TreeList exposed this functionality as the grid does.
I'd like to see the Editable.Window Configuration in TreeLists like in Grids, one would actually expect this configuration to be available on all controls that have an Editable configuration.
On a grid I use this code to set AutoFocus, but it is only available through JQuery on a TreeList.
.Editable(editable => editable.DisplayDeleteConfirmation(false) .Mode(GridEditMode.PopUp) .TemplateName("AccountEditor") .Window(w => w .Scrollable(false).AutoFocus(false) ))
Thanks
M
Problem Statement: Unable to set the Filterable operators instead of default's in Tree List .Net Core.
When i add the below to the TreeList :
.Filterable
(f => f
.Operators(op => op
.ForString(str => str.Clear()
.Contains("Contains")
.DoesNotContain("Does not contain")
.StartsWith("Start with")
.EndsWith("Ends with")
.IsEqualTo("Is equal to")
.IsNotEqualTo("Is not equal to")
)))
Error:
Severity Code Description Project File Line Suppression State
Error CS1061 'TreeListFilterableSettingsBuilder<dynamic>' does not contain a definition for 'Operators' and no accessible extension method 'Operators' accepting a first argument of type 'TreeListFilterableSettingsBuilder<dynamic>' could be found (are you missing a using directive or an assembly reference?) MSA_Client_Portal C:\Users\anilc\source\repos\Client Portal - NEW\src\MSA_Client_Portal\Views\LegislationSection\LegislationTree.cshtml 90 Active