ThemedSortableList example

Jan 27, 2015 at 12:24 PM
Hi Frank,

I've made an attempt to create Razor templates following ones in DataGrid.cshtml file, but without success. I don't know how to map columns to underlying container (ordinary and themed grids both support columns and can use TABLE elements, but ordinary sortable list does not support columns and is based on OL/UL lists...

The crucial point seems to me is a construction of sortable list per se (bellow is my error attempt):
  @DisplayHeader(options.HtmlHelper, options)
      enableMultipleInsert: (options.Features & SortableListFeatures.InsertOne) != SortableListFeatures.InsertOne,
      itemCss: "Theme-DataGrid-ItemCss",
      altItemCss: "Theme-DataGrid-AlternateItemCss"
Is there any example of those templates? At least I'd appreciate some hints which could push me forward.

Thanks, pf
Feb 1, 2015 at 4:21 PM
you may find more details on the sortable list in general here. Moreover both the ThemedGrid example and the BinariesWithSimpleExamples containe example of usage.

Aout how to buld a "themed" sortable list you may see the general theming documentation here. You may also extrapolate from how the themed grid is built.

Unluckly there is no "complex" example of sortable list like the one of the themed grid. The reason is that, the technique of defining generic purpose control prorotypes with Razor Views has too many drawbacks(difficult testing, no Visual studio intellisense, ecc.). Thus we abandoned our initial goal of furnishing a set of predefined themes for the project of building a commercial control suite on top of the Mvc Controls Toolkit. In this suite Control templates are implemted by composing pre-defined overall control, row, and colum tremplates. The user has the option to define custom templates for each of them, but thahnks to the composition technique we avoided the usage of dynamic variables, so that the user may always benefit of compilation syntax checks, and of VS intellisense. You may find more infos on the product web site.