Menu - Data binding


About this example


The Bind method is used to bind the Menu to the Model. Note that the MVC Menu can only be bound to hierarchal data sources, and as such, a Model object passed to the Bind method must support the IHierarchicalEnumerable interface or IHierarchicalNodeProvider interface.

  • Bind(IHierarchicalEnumerable model, MapAction mapper);
  • Bind(HierarchicalNodeProviderBase dataProvider);
  • Bind(T root);
  • Bind(T root, Func dataBound);
  • Bind(string xmlUrl);
  • Bind(string xmlUrl, MapAction mapper);

This demo show use Norwind sample database and binding the menu to category and production data.