Available in the Full Version
Tile Manager - ASP.NET MVC Basic Usage
This sample uses CTP (Community Technical Preview) features. The API and behavior may change when these features are released with full support.
This sample is designed for a larger screen size.
On mobile, try rotating your screen, view full size, or email to another device.
This example demonstrates using the ASP.NET MVC helper for the Tile Manager control.
Code View
Copy to Clipboard
@using Infragistics.Web.Mvc @using IgniteUI.SamplesBrowser.Models @model IEnumerable<IgniteUI.SamplesBrowser.Models.Northwind.Category> <!DOCTYPE html> <html> <head> <title></title> <!-- Ignite UI for jQuery Required Combined CSS Files --> <link href="http://cdn-na.infragistics.com/igniteui/2024.1/latest/css/themes/infragistics/infragistics.theme.css" rel="stylesheet" /> <link href="http://cdn-na.infragistics.com/igniteui/2024.1/latest/css/structure/infragistics.css" rel="stylesheet" /> <script src="http://ajax.aspnetcdn.com/ajax/modernizr/modernizr-2.8.3.js"></script> <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script> <script src="http://code.jquery.com/ui/1.11.1/jquery-ui.min.js"></script> <!-- Ignite UI for jQuery Required Combined JavaScript Files --> <script src="http://cdn-na.infragistics.com/igniteui/2024.1/latest/js/infragistics.core.js"></script> <script src="http://cdn-na.infragistics.com/igniteui/2024.1/latest/js/infragistics.lob.js"></script> </head> <body> <style type="text/css"> #dashboard { position: relative; width: 100%; height: 600px; border: none; } .ui-igtile-minimized .ui-igtile-inner-container h3 { position: absolute; width: 208px; height: 50px; margin-top: -25px; top: 50%; text-align:center; font-size: 20px; } @@media all and (max-width: 480) { .sample-page #sample { margin-left: 0; margin-right: 0; } } </style> @(Html.Infragistics() .TileManager(Model.AsQueryable()) .ID("dashboard") .ColumnWidth(240) .SplitterOptions(so => so .Enabled(true) .Collapsed(false) .Collapsible(true)) .MinimizedState("<h3>${CategoryName}</h3>") .MaximizedState("<h3><img src=\"${ImageUrl}\" title=\"${CategoryName}\" alt=\"error\" /> ${CategoryName}</h3><p>${Description}</p>" + "<ul class=\"tree\"><li>Products – ${ProductCount}<ul>{{each ${Products} }}<li>${Products.ProductName}</li>{{/each}}</ul></li></ul>") .DataBind() .Render() ) <script type="text/javascript"> $(document).on('igtilemanagertilemaximized', function (){ $('.tree').igTree(); }); </script> </body> </html>
using System.Web.Mvc; using IgniteUI.SamplesBrowser.Models.Northwind; using IgniteUI.SamplesBrowser.Models.Repositories; using System.Collections.Generic; namespace IgniteUI.SamplesBrowser.Controllers { public class TileManagerController : Controller { [ActionName("aspnet-mvc-helper")] public ActionResult BasicMvcHelper() { IEnumerable<Category> categories = RepositoryFactory.GetCategoryRepository().Get(); return View("aspnet-mvc-helper", categories); } } }
using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace IgniteUI.SamplesBrowser.Models.Northwind { public class Category { public int ID { get; set; } public string CategoryName { get; set; } public string Description { get; set; } public string ImageUrl { get; set; } public int ProductCount { get; set; } public IEnumerable<Product> Products { get; set; } } }