Your search did not match any results.

Overview

DevExtreme ASP.NET Core MVC Dialog and Notification UI components is a collection of jQuery-powered server-side controls that provide interactivity to an ASP.NET Core MVC app. You can configure each control with Razor C# or Razor VB syntax, and use them in MVC views as well as in Razor Pages (introduced in .NET Core 2.0).

Backend API
@using DevExtreme.NETCore.Demos.Models @model IEnumerable<GalleryItem> <script> var favoritesList = []; </script> <div class="images"> @foreach(var property in Model) { <div onclick="showPopup(@property.ID, '@property.Address')"> <div class="item-content"> <img alt="@property.Address" src="@property.Image" /> <div class="item-options"> <div> <div class="address">@property.Address</div> <div class="price large-text">$@string.Format("{0:n0}", property.Price)</div> <div class="agent"> <div id="@("house" + property.ID)"> <img alt="Listing agent" src="~/images/icon-agent.svg"> Listing agent </div> </div> </div> </div> </div> @(Html.DevExtreme().Popover() .Target("#house" + property.ID) .ShowEvent("mouseenter") .HideEvent("mouseleave") .Width(260) .ContentTemplate( "<div class='agent-details'>" + "<img alt='" + property.Agent.FirstName + " " + property.Agent.LastName + "' src='" + property.Agent.Picture + "' />" + "<div>" + "<div class='name large-text'>" + property.Agent.FirstName + " " + property.Agent.LastName + "</div>" + "<div class='phone'>Tel: " + property.Agent.Phone + "</div>" + "</div>" + "</div>") .Position(a => a .At(HorizontalAlignment.Center, VerticalAlignment.Bottom) .My(HorizontalAlignment.Center, VerticalAlignment.Top) .Collision(PositionResolveCollision.Fit, PositionResolveCollision.Flip) .Offset(0, 2) ) ) @using(Html.DevExtreme().NamedTemplate("popup-template-" + property.ID)) { <div class='popup-property-details'> <div class='large-text'>$@string.Format("{0:n0}", property.Price)</div> <div class='opacity'>@property.Address, @property.City, @property.State</div> @(Html.DevExtreme().Button() .ElementAttr("class", "favorites") .OnInitialized(@<text> function buttonOnInitialized(e) { setFavoriteText(e, @property.ID); } </text>) .Icon("favorites") .Width(260) .Height(44) .OnClick(@<text> function buttonOnInitialized(e) { changeFavorite(e, @property.ID); } </text>) ) <div class='images'> <img alt="@property.Address" src="@property.Image" /> <img alt="@property.Address" src="@property.Image.Replace(".jpg", "b.jpg")" /> </div> <div>@property.Features</div> </div> } </div> } @(Html.DevExtreme().Popup() .ID("property-popup") .Width(660) .Height(540) .ShowTitle(true) .Title("") .Visible(false) .DragEnabled(false) .HideOnOutsideClick(true) .ShowCloseButton(true) ) </div> <script> function removeItemFromFavorites(id) { var itemIndex = favoritesList.indexOf(id); if (itemIndex >= 0) { favoritesList.splice(itemIndex, 1); } } function showPopup(id, address) { var popup = $("#property-popup").dxPopup("instance"); popup.option("contentTemplate", $("#popup-template-" + id)); popup.option("title", address); popup.show(); } function setButtonText(button, isFav) { button.option("text", isFav ? "Remove from Favorites" : "Add to Favorites"); } function setFavoriteText(e, id) { setButtonText(e.component, favoritesList.indexOf(id) >= 0); } function changeFavorite(e, id) { var favoriteState = favoritesList.indexOf(id) == -1; favoriteState ? favoritesList.push(id) : removeItemFromFavorites(id); setButtonText(e.component, favoriteState); var message = "This item has been " + (favoriteState ? "added to" : "removed from") + " the Favorites list!"; DevExpress.ui.notify({ message: message, width: 450 }, favoriteState ? "success" : "error", 2000 ); } </script>
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using DevExtreme.AspNet.Mvc; using Newtonsoft.Json; using DevExtreme.AspNet.Data; using DevExtreme.NETCore.Demos.Models; using DevExtreme.NETCore.Demos.Models.SampleData; using DevExtreme.NETCore.Demos.ViewModels; using DevExtreme.NETCore.Demos.Models.DataGrid; // For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860 namespace DevExtreme.NETCore.Demos.Controllers { public class CommonController : Controller { public ActionResult DialogsAndNotificationsOverview() { var i = 0; return View(SampleData.GalleryItems.Select(a => new GalleryItem { ID = a.ID, Address = a.Address, City = a.City, State = a.State, Price = a.Price, Features = a.Features, Image = a.Image, Agent = SampleData.DataGridEmployees.Skip(i++ % 4).FirstOrDefault() })); } } }
using System; using System.Collections.Generic; using System.Linq; using DevExtreme.NETCore.Demos.Models.DataGrid; namespace DevExtreme.NETCore.Demos.Models.SampleData { public partial class SampleData { public static IEnumerable<Employee> DataGridEmployees = new[] { new Employee { ID = 1, FirstName = "John", LastName = "Heart", Phone = "(213) 555-9392", Prefix = "Mr.", Position = "CEO", BirthDate = DateTime.Parse("1964/03/16"), HireDate = DateTime.Parse("1995/01/15"), Notes = "John has been in the Audio/Video industry since 1990. He has led DevAv as its CEO since 2003.\r\n\r\nWhen not working hard as the CEO, John loves to golf and bowl. He once bowled a perfect game of 300.", Email = "jheart@dx-email.com", Address = "351 S Hill St.", City = "Los Angeles", Tasks = new[] { new EmployeeTask { ID = 5, Subject = "Choose between PPO and HMO Health Plan", StartDate = DateTime.Parse("2013/02/15"), DueDate = DateTime.Parse("2013/04/15"), Status = "In Progress", Priority = Priority.High, Completion = 75 }, new EmployeeTask { ID = 6, Subject = "Google AdWords Strategy", StartDate = DateTime.Parse("2013/02/16"), DueDate = DateTime.Parse("2013/02/28"), Status = "Completed", Priority = Priority.High, Completion = 100 }, new EmployeeTask { ID = 7, Subject = "New Brochures", StartDate = DateTime.Parse("2013/02/17"), DueDate = DateTime.Parse("2013/02/24"), Status = "Completed", Priority = Priority.Normal, Completion = 100 }, new EmployeeTask { ID = 22, Subject = "Update NDA Agreement", StartDate = DateTime.Parse("2013/03/14"), DueDate = DateTime.Parse("2013/03/16"), Status = "Completed", Priority = Priority.High, Completion = 100 }, new EmployeeTask { ID = 52, Subject = "Review Product Recall Report by Engineering Team", StartDate = DateTime.Parse("2013/05/17"), DueDate = DateTime.Parse("2013/05/20"), Status = "Completed", Priority = Priority.High, Completion = 100 } }, State = "California", StateID = 5, HomePhone = "(213) 555-9208", Skype = "jheartDXskype", Picture = "../../images/employees/01.png" }, new Employee { ID = 2, FirstName = "Olivia", LastName = "Peyton", Phone = "(310) 555-2728", Prefix = "Mrs.", Position = "Sales Assistant", BirthDate = DateTime.Parse("1981/06/03"), HireDate = DateTime.Parse("2012/05/14"), Notes = "Olivia loves to sell. She has been selling DevAV products since 2012. \r\n\r\nOlivia was homecoming queen in high school. She is expecting her first child in 6 months. Good Luck Olivia.", Email = "oliviap@dx-email.com", Address = "807 W Paseo Del Mar", City = "Los Angeles", Tasks = new[] { new EmployeeTask { ID = 3, Subject = "Update Personnel Files", StartDate = DateTime.Parse("2013/02/03"), DueDate = DateTime.Parse("2013/02/28"), Status = "Completed", Priority = Priority.High, Completion = 100 }, new EmployeeTask { ID = 4, Subject = "Review Health Insurance Options Under the Affordable Care Act", StartDate = DateTime.Parse("2013/02/12"), DueDate = DateTime.Parse("2013/04/25"), Status = "In Progress", Priority = Priority.High, Completion = 50 }, new EmployeeTask { ID = 21, Subject = "Non-Compete Agreements", StartDate = DateTime.Parse("2013/03/12"), DueDate = DateTime.Parse("2013/03/14"), Status = "Completed", Priority = Priority.Low, Completion = 100 }, new EmployeeTask { ID = 50, Subject = "Give Final Approval for Refunds", StartDate = DateTime.Parse("2013/05/05"), DueDate = DateTime.Parse("2013/05/15"), Status = "Completed", Priority = Priority.Normal, Completion = 100 } }, State = "California", StateID = 5, HomePhone = "(310) 555-4547", Skype = "oliviapDXskype", Picture = "../../images/employees/09.png" }, new Employee { ID = 3, FirstName = "Robert", LastName = "Reagan", Phone = "(818) 555-2387", Prefix = "Mr.", Position = "CMO", BirthDate = DateTime.Parse("1974/09/07"), HireDate = DateTime.Parse("2002/11/08"), Notes = "Robert was recently voted the CMO of the year by CMO Magazine. He is a proud member of the DevAV Management Team.\r\n\r\nRobert is a championship BBQ chef, so when you get the chance ask him for his secret recipe.", Address = "4 Westmoreland Pl.", City = "Bentonville", Tasks = new[] { new EmployeeTask { ID = 16, Subject = "Deliver R&D Plans for 2013", StartDate = DateTime.Parse("2013/03/01"), DueDate = DateTime.Parse("2013/03/10"), Status = "Completed", Priority = Priority.High, Completion = 100 }, new EmployeeTask { ID = 74, Subject = "Decide on Mobile Devices to Use in the Field", StartDate = DateTime.Parse("2013/07/30"), DueDate = DateTime.Parse("2013/08/02"), Status = "Completed", Priority = Priority.High, Completion = 100 }, new EmployeeTask { ID = 78, Subject = "Try New Touch-Enabled WinForms Apps", StartDate = DateTime.Parse("2013/08/11"), DueDate = DateTime.Parse("2013/08/15"), Status = "Completed", Priority = Priority.Normal, Completion = 100 }, new EmployeeTask { ID = 117, Subject = "Approval on Converting to New HDMI Specification", StartDate = DateTime.Parse("2014/01/11"), DueDate = DateTime.Parse("2014/01/31"), Status = "Deferred", Priority = Priority.Normal, Completion = 75 } }, Email = "robertr@dx-email.com", State = "Arkansas", StateID = 4, HomePhone = "(818) 555-2438", Skype = "robertrDXskype", Picture = "../../images/employees/03.png" }, new Employee { ID = 4, FirstName = "Greta", LastName = "Sims", Phone = "(818) 555-6546", Prefix = "Ms.", Position = "HR Manager", BirthDate = DateTime.Parse("1977/11/22"), HireDate = DateTime.Parse("1998/04/23"), Notes = "Greta has been DevAV's HR Manager since 2003. She joined DevAV from Sonee Corp.\r\n\r\nGreta is currently training for the NYC marathon. Her best marathon time is 4 hours. Go Greta.", Email = "gretas@dx-email.com", Address = "1700 S Grandview Dr.", City = "Atlanta", Tasks = new[] { new EmployeeTask { ID = 20, Subject = "Approve Hiring of John Jeffers", StartDate = DateTime.Parse("2013/03/02"), DueDate = DateTime.Parse("2013/03/12"), Status = "Completed", Priority = Priority.Normal, Completion = 100 }, new EmployeeTask { ID = 23, Subject = "Update Employee Files with New NDA", StartDate = DateTime.Parse("2013/03/16"), DueDate = DateTime.Parse("2013/03/26"), Status = "Need Assistance", Priority = Priority.Normal, Completion = 90 }, new EmployeeTask { ID = 40, Subject = "Provide New Health Insurance Docs", StartDate = DateTime.Parse("2013/03/28"), DueDate = DateTime.Parse("2013/04/07"), Status = "Completed", Priority = Priority.Normal, Completion = 100 } }, State = "Georgia", StateID = 11, HomePhone = "(818) 555-0976", Skype = "gretasDXskype", Picture = "../../images/employees/04.png" }, new Employee { ID = 5, FirstName = "Brett", LastName = "Wade", Phone = "(626) 555-0358", Prefix = "Mr.", Position = "IT Manager", BirthDate = DateTime.Parse("1968/12/01"), HireDate = DateTime.Parse("2009/03/06"), Notes = "Brett came to DevAv from Microsoft and has led our IT department since 2012.\r\n\r\nWhen he is not working hard for DevAV, he coaches Little League (he was a high school pitcher).", Email = "brettw@dx-email.com", Address = "1120 Old Mill Rd.", City = "Boise", Tasks = new[] { new EmployeeTask { ID = 2, Subject = "Prepare 3013 Marketing Plan", StartDate = DateTime.Parse("2013/01/01"), DueDate = DateTime.Parse("2013/01/31"), Status = "Completed", Priority = Priority.High, Completion = 100 }, new EmployeeTask { ID = 11, Subject = "Rollout of New Website and Marketing Brochures", StartDate = DateTime.Parse("2013/02/20"), DueDate = DateTime.Parse("2013/02/28"), Status = "Completed", Priority = Priority.High, Completion = 100 }, new EmployeeTask { ID = 15, Subject = "Review 2012 Sales Report and Approve 2013 Plans", StartDate = DateTime.Parse("2013/02/23"), DueDate = DateTime.Parse("2013/02/28"), Status = "Completed", Priority = Priority.Normal, Completion = 100 }, new EmployeeTask { ID = 81, Subject = "Review Site Up-Time Report", StartDate = DateTime.Parse("2013/08/24"), DueDate = DateTime.Parse("2013/08/30"), Status = "Completed", Priority = Priority.Urgent, Completion = 100 } }, State = "Idaho", StateID = 13, HomePhone = "(626) 555-5985", Skype = "brettwDXskype", Picture = "../../images/employees/05.png" }, new Employee { ID = 6, FirstName = "Sandra", LastName = "Johnson", Phone = "(562) 555-2082", Prefix = "Mrs.", Position = "Controller", BirthDate = DateTime.Parse("1974/11/15"), HireDate = DateTime.Parse("2005/05/11"), Notes = "Sandra is a CPA and has been our controller since 2008. She loves to interact with staff so if you've not met her, be certain to say hi.\r\n\r\nSandra has 2 daughters both of whom are accomplished gymnasts.", Email = "sandraj@dx-email.com", Address = "4600 N Virginia Rd.", City = "Beaver", Tasks = new[] { new EmployeeTask { ID = 20, Subject = "Approve Hiring of John Jeffers", StartDate = DateTime.Parse("2013/03/02"), DueDate = DateTime.Parse("2013/03/12"), Status = "Completed", Priority = Priority.Normal, Completion = 100 }, new EmployeeTask { ID = 23, Subject = "Update Employee Files with New NDA", StartDate = DateTime.Parse("2013/03/16"), DueDate = DateTime.Parse("2013/03/26"), Status = "Need Assistance", Priority = Priority.Normal, Completion = 90 }, new EmployeeTask { ID = 40, Subject = "Provide New Health Insurance Docs", StartDate = DateTime.Parse("2013/03/28"), DueDate = DateTime.Parse("2013/04/07"), Status = "Completed", Priority = Priority.Normal, Completion = 100 }, new EmployeeTask { ID = 138, Subject = "Review HR Budget Company Wide", StartDate = DateTime.Parse("2014/03/20"), DueDate = DateTime.Parse("2014/03/25"), Status = "In Progress", Priority = Priority.Normal, Completion = 40 }, new EmployeeTask { ID = 145, Subject = "Final Budget Review", StartDate = DateTime.Parse("2014/03/26"), DueDate = DateTime.Parse("2014/03/27"), Status = "In Progress", Priority = Priority.High, Completion = 25 } }, State = "Utah", StateID = 44, HomePhone = "(562) 555-8272", Skype = "sandrajDXskype", Picture = "../../images/employees/06.png" }, new Employee { ID = 7, FirstName = "Kevin", LastName = "Carter", Phone = "(213) 555-2840", Prefix = "Mr.", Position = "Shipping Manager", BirthDate = DateTime.Parse("1978/01/09"), HireDate = DateTime.Parse("2009/08/11"), Notes = "Kevin is our hard-working shipping manager and has been helping that department work like clockwork for 18 months.\r\n\r\nWhen not in the office, he is usually on the basketball court playing pick-up games.", Email = "kevinc@dx-email.com", Address = "424 N Main St.", City = "San Diego", Tasks = new[] { new EmployeeTask { ID = 24, Subject = "Sign Updated NDA", StartDate = DateTime.Parse("2013/03/20"), DueDate = DateTime.Parse("2013/03/25"), Status = "Completed", Priority = Priority.Urgent, Completion = 100 }, new EmployeeTask { ID = 55, Subject = "Review Overtime Report", StartDate = DateTime.Parse("2013/06/10"), DueDate = DateTime.Parse("2013/06/14"), Status = "Completed", Priority = Priority.Normal, Completion = 100 }, new EmployeeTask { ID = 71, Subject = "Upgrade Server Hardware", StartDate = DateTime.Parse("2013/07/22"), DueDate = DateTime.Parse("2013/07/31"), Status = "Completed", Priority = Priority.Urgent, Completion = 100 }, new EmployeeTask { ID = 72, Subject = "Upgrade Personal Computers", StartDate = DateTime.Parse("2013/07/24"), DueDate = DateTime.Parse("2014/04/30"), Status = "In Progress", Priority = Priority.Normal, Completion = 85 } }, State = "California", StateID = 5, HomePhone = "(213) 555-8038", Skype = "kevincDXskype", Picture = "../../images/employees/07.png" }, new Employee { ID = 8, FirstName = "Cynthia", LastName = "Stanwick", Phone = "(818) 555-6655", Prefix = "Ms.", Position = "HR Assistant", BirthDate = DateTime.Parse("1985/06/05"), HireDate = DateTime.Parse("2008/03/24"), Notes = "Cindy joined us in 2008 and has been in the HR department for 2 years. \r\n\r\nShe was recently awarded employee of the month. Way to go Cindy!", Email = "cindys@dx-email.com", Address = "2211 Bonita Dr.", City = "Little Rock", Tasks = new[] { new EmployeeTask { ID = 1, Subject = "Prepare 2013 Financial", StartDate = DateTime.Parse("2013/01/15"), DueDate = DateTime.Parse("2013/01/31"), Status = "Completed", Priority = Priority.High, Completion = 100 }, new EmployeeTask { ID = 25, Subject = "Sign Updated NDA", StartDate = DateTime.Parse("2013/03/20"), DueDate = DateTime.Parse("2013/03/25"), Status = "Completed", Priority = Priority.Urgent, Completion = 100 }, new EmployeeTask { ID = 35, Subject = "Update Revenue Projections", StartDate = DateTime.Parse("2013/03/24"), DueDate = DateTime.Parse("2013/04/07"), Status = "Completed", Priority = Priority.Normal, Completion = 100 }, new EmployeeTask { ID = 99, Subject = "Submit D&B Number to ISP for Credit Approval", StartDate = DateTime.Parse("2013/11/04"), DueDate = DateTime.Parse("2013/11/07"), Status = "Completed", Priority = Priority.High, Completion = 100 } }, State = "Arkansas", StateID = 4, HomePhone = "(818) 555-6808", Skype = "cindysDXskype", Picture = "../../images/employees/08.png" }, new Employee { ID = 9, FirstName = "Kent", LastName = "Samuelson", Phone = "(562) 555-9282", Prefix = "Dr.", Position = "Ombudsman", BirthDate = DateTime.Parse("1972/09/11"), HireDate = DateTime.Parse("2009/04/22"), Notes = "As our ombudsman, Kent is on the front-lines solving customer problems and helping our partners address issues out in the field. He is a classically trained musician and is a member of the Chamber Orchestra.", Email = "kents@dx-email.com", Address = "12100 Mora Dr", City = "St. Louis", Tasks = new[] { new EmployeeTask { ID = 12, Subject = "Update Sales Strategy Documents", StartDate = DateTime.Parse("2013/02/20"), DueDate = DateTime.Parse("2013/02/22"), Status = "Completed", Priority = Priority.Normal, Completion = 100 }, new EmployeeTask { ID = 26, Subject = "Sign Updated NDA", StartDate = DateTime.Parse("2013/03/20"), DueDate = DateTime.Parse("2013/03/25"), Status = "Need Assistance", Priority = Priority.Urgent, Completion = 25 }, new EmployeeTask { ID = 36, Subject = "Review Revenue Projections", StartDate = DateTime.Parse("2013/03/25"), DueDate = DateTime.Parse("2013/04/06"), Status = "Completed", Priority = Priority.High, Completion = 100 }, new EmployeeTask { ID = 60, Subject = "Refund Request Template", StartDate = DateTime.Parse("2013/06/17"), DueDate = DateTime.Parse("2014/04/01"), Status = "Deferred", Priority = Priority.Normal, Completion = 0 } }, State = "Missouri", StateID = 26, Picture = "../../images/employees/02.png", HomePhone = "(562) 555-1328", Skype = "kentsDXskype" }, new Employee { ID = 10, FirstName = "Taylor", LastName = "Riley", Phone = "(310) 555-7276", Prefix = "Mr.", Position = "Network Admin", BirthDate = DateTime.Parse("1982/08/14"), HireDate = DateTime.Parse("2012/04/14"), Notes = "If you are like the rest of us at DevAV, then you've probably reached out for help from Taylor. He does a great job as a member of our IT department.", Email = "taylorr@dx-email.com", Address = "7776 Torreyson Dr", City = "San Jose", Tasks = new[] { new EmployeeTask { ID = 1, Subject = "Prepare 2013 Financial", StartDate = DateTime.Parse("2013/01/15"), DueDate = DateTime.Parse("2013/01/31"), Status = "Completed", Priority = Priority.High, Completion = 100 }, new EmployeeTask { ID = 25, Subject = "Sign Updated NDA", StartDate = DateTime.Parse("2013/03/20"), DueDate = DateTime.Parse("2013/03/25"), Status = "Completed", Priority = Priority.Urgent, Completion = 100 }, new EmployeeTask { ID = 35, Subject = "Update Revenue Projections", StartDate = DateTime.Parse("2013/03/24"), DueDate = DateTime.Parse("2013/04/07"), Status = "Completed", Priority = Priority.Normal, Completion = 100 } }, State = "California", StateID = 5, HomePhone = "(310) 555-9712", Skype = "taylorrDXskype" }, new Employee { ID = 11, FirstName = "Sam", LastName = "Hill", Phone = "(800) 555-2797", Prefix = "Mr.", Position = "Sales Assistant", BirthDate = DateTime.Parse("1984/02/17"), HireDate = DateTime.Parse("2012/02/01"), Notes = "Sammy is proud to be a member of the DevAV team. He joined the team in 2012 and has been in the sales department from the beginning.\r\n\r\nHe has just picked up golf so you can find him on the links every weekend.", Email = "sammyh@dx-email.com", Address = "645 Prospect Crescent", City = "Warner Robbins", Tasks = new[] { new EmployeeTask { ID = 35, Subject = "Update Revenue Projections", StartDate = DateTime.Parse("2013/03/24"), DueDate = DateTime.Parse("2013/04/07"), Status = "Completed", Priority = Priority.Normal, Completion = 100 } }, State = "Georgia", StateID = 11, HomePhone = "(800) 555-6377", Skype = "sammyhDXskype" }, new Employee { ID = 12, FirstName = "Kelly", LastName = "Rodriguez", Phone = "(800) 595-3232", Prefix = "Ms.", Position = "Support Assistant", BirthDate = DateTime.Parse("1988/05/11"), HireDate = DateTime.Parse("2012/10/13"), Notes = "Kelly loves people and that's why she joined DevAV's support department. One of the funniest people in the company, she does stand-up on the weekends at the Laugh Factory.", Email = "kellyr@dx-email.com", Address = "1601 W Mountain St.", City = "Compton", Tasks = new[] { new EmployeeTask { ID = 25, Subject = "Sign Updated NDA", StartDate = DateTime.Parse("2013/03/20"), DueDate = DateTime.Parse("2013/03/25"), Status = "Completed", Priority = Priority.Urgent, Completion = 100 }, new EmployeeTask { ID = 35, Subject = "Update Revenue Projections", StartDate = DateTime.Parse("2013/03/24"), DueDate = DateTime.Parse("2013/04/07"), Status = "Completed", Priority = Priority.Normal, Completion = 100 } }, State = "California", StateID = 5, HomePhone = "(800) 595-4327", Skype = "kellyrDXskype" }, new Employee { ID = 13, FirstName = "Natalie", LastName = "Maguirre", Phone = "(612) 304-6073", Prefix = "Mrs.", Position = "Trainer", BirthDate = DateTime.Parse("1977/10/07"), HireDate = DateTime.Parse("2008/06/19"), Notes = "Natalie travels the US and teaches our partners how to explain the benefits of our products to customers.\r\n\r\nShe is a proud wife and mom and volunteers her time at the elementary school.", Email = "nataliem@dx-email.com", Address = "6400 E Bixby Hill Rd", City = "Las Vegas", Tasks = new[] { new EmployeeTask { ID = 60, Subject = "Refund Request Template", StartDate = DateTime.Parse("2013/06/17"), DueDate = DateTime.Parse("2014/04/01"), Status = "Deferred", Priority = Priority.Normal, Completion = 0 } }, State = "Nevada", StateID = 29, HomePhone = "(612) 304-2265", Skype = "nataliemDXskype" }, new Employee { ID = 14, FirstName = "Walter", LastName = "Hobbs", Phone = "(800) 955-2292", Prefix = "Mr.", Position = "Programmer", BirthDate = DateTime.Parse("1984/12/24"), HireDate = DateTime.Parse("2011/02/17"), Notes = "Walter has been developing apps and websites for DevAV since 2011. His passion is software and if you ever walk by his desk, you'll know why.\r\n\r\nWally once worked 72 hours straight - writing code and fixing bugs.", Email = "walterh@dx-email.com", Address = "10385 Shadow Oak Dr", City = "Eagle", Tasks = new[] { new EmployeeTask { ID = 20, Subject = "Approve Hiring of John Jeffers", StartDate = DateTime.Parse("2013/03/02"), DueDate = DateTime.Parse("2013/03/12"), Status = "Completed", Priority = Priority.Normal, Completion = 100 }, new EmployeeTask { ID = 23, Subject = "Update Employee Files with New NDA", StartDate = DateTime.Parse("2013/03/16"), DueDate = DateTime.Parse("2013/03/26"), Status = "Need Assistance", Priority = Priority.Normal, Completion = 90 } }, State = "Idaho", StateID = 13, HomePhone = "(800) 955-7848", Skype = "walterhDXskype" } }; } }
using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using Newtonsoft.Json; namespace DevExtreme.NETCore.Demos.Models.DataGrid { public class Employee { [JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "ID")] public int ID { get; set; } [JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "FirstName")] public string FirstName { get; set; } [JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "LastName")] public string LastName { get; set; } [JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "Phone")] public string Phone { get; set; } [Display(Name = "Title")] [JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "Prefix")] public string Prefix { get; set; } [JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "Position")] public string Position { get; set; } [JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "BirthDate")] public DateTime? BirthDate { get; set; } [JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "HireDate")] public DateTime? HireDate { get; set; } [JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "Notes")] public string Notes { get; set; } [JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "Email")] public string Email { get; set; } [JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "Address")] public string Address { get; set; } [JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "City")] public string City { get; set; } [JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "Tasks")] public ICollection<EmployeeTask> Tasks { get; set; } [Display(Name = "State")] [JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "StateID")] public int? StateID { get; set; } [JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "State")] public string State { get; set; } [JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "HomePhone")] public string HomePhone { get; set; } [JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "Skype")] public string Skype { get; set; } [JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "Picture")] public string Picture { get; set; } } }
using DevExtreme.NETCore.Demos.Models.DataGrid; using System; using System.Collections.Generic; using System.Linq; namespace DevExtreme.NETCore.Demos.Models { public class GalleryItem { public int ID { get; set; } public string Address { get; set; } public string City { get; set; } public string State { get; set; } public string ZipCode { get; set; } public int Beds { get; set; } public int Baths { get; set; } public int HouseSize { get; set; } public double LotSize { get; set; } public int Price { get; set; } public string Coordinates { get; set; } public string Features { get; set; } public string YearBuilt { get; set; } public int Type { get; set; } public int Status { get; set; } public string Image { get; set; } public Employee Agent { get; set; } } }
using System; using System.Collections.Generic; using System.Linq; namespace DevExtreme.NETCore.Demos.Models.SampleData { public partial class SampleData { public static readonly IEnumerable<GalleryItem> GalleryItems = new[] { new GalleryItem { ID = 1, Address = "652 Avonwick Gate", City = "Toronto", State = "ON", ZipCode = "M3A25", Beds = 4, Baths = 4, HouseSize = 7500, LotSize = 0.8, Price = 780000, Coordinates = "43.7507639, -79.3184378", Features = "Dishwasher, Disposal, Separate laundry room, 3/4 bath downstairs, Formal dining room, Downstairs family room, Separate family room, Breakfast Bar/Counter, Breakfast nook (eating area), Granite countertops in kitchen, Hardwood flooring in kitchen, Kitchen island, Solid surface countertops in kitchen, Entry foyer, Front living room, Ceiling fan in master bedroom, Master bedroom separate from other, Mirrored door closet in master bedroom, 2nd Bedroom = 11x13, 3rd Bedroom = 11x14, 4th Bedroom = 18x13, Alarm system owned, Built-in microwave, Carpet, Ceiling fan(s), Convection oven, Double built-in gas ovens, Gas cooktop, Gas stove, Marble/Stone floors", YearBuilt = "2008", Type = 0, Status = 1, Image = "../../images/Gallery/1.jpg" }, new GalleryItem { ID = 2, Address = "82649 Topeka St", City = "Riverbank", State = "CA", ZipCode = "95360", Beds = 5, Baths = 3, HouseSize = 12500, LotSize = 1.2, Price = 1750000, Coordinates = "37.7369999,-120.9430488", Features = "Dishwasher, Disposal, Separate laundry room, Full bath downstairs, Formal dining room, Downstairs family room, Separate family room, Breakfast Bar/Counter, Breakfast nook (eating area), Granite countertops in kitchen, Kitchen custom cabinets, Kitchen island, Pantry, Walk-in pantry, Entry foyer, Formal living room, Rear living room, Vaulted ceiling in living room, Balcony in master bedroom, Master bedroom separate from other, Master bedroom upstairs, Sitting room in master bedroom, Walk-in closet in master bedroom, 2nd Bedroom = 13X20, 3rd Bedroom = 13X17, 4th Bedroom = 13X18, 5th Bedroom = 14X16, Alarm system owned, Blinds, Built-in electric oven, Built-in microwave, Carpet, Ceiling fan(s), Gas cooktop, Intercom system, Marble/Stone floors, Water conditioner owned, Water filtering system, Window Coverings Throughout", YearBuilt = "2009", Type = 0, Status = 0, Image = "../../images/Gallery/2.jpg" }, new GalleryItem { ID = 3, Address = "328 S Kerema Ave", City = "Milford", State = "CT", ZipCode = "06465", Beds = 4, Baths = 2, HouseSize = 8356, LotSize = 0.04, Price = 350000, Coordinates = "41.1957999,-73.1022988", Features = "Dishwasher, Disposal, Refrigerator, Separate laundry room, Washer/Dryer on 2nd floor, Full bath downstairs, Formal dining room, Downstairs family room, Separate family room, Wet bar in family room, Breakfast nook (eating area), Garden window in kitchen, Granite countertops in kitchen, Kitchen island, Marble/Stone flooring in kitchen, Pantry, Formal living room, Front living room, Master bedroom separate from other, Master bedroom upstairs, Sitting room in master bedroom, Walk-in closet in master bedroom, 2nd Bedroom = 16x12, 3rd Bedroom = 13x16, 4th Bedroom = 18x12, Alarm system owned, Built-in microwave, Carpet, Ceiling fan(s), Double built-in electric ovens, Gas cooktop, Marble/Stone floors", YearBuilt = "2010", Type = 0, Status = 0, Image = "../../images/Gallery/3.jpg" }, new GalleryItem { ID = 4, Address = "5119 Beryl Dr", City = "San Antonio", State = "TX", ZipCode = "78212", Beds = 4, Baths = 2, HouseSize = 7980, LotSize = 0.7, Price = 455000, Coordinates = "29.4972699,-98.5366788", Features = "Dishwasher, Disposal, Refrigerator, Separate laundry room, Full bath downstairs, Living/Dining room combo, Separate family room, Breakfast Bar/Counter, Breakfast nook (eating area), Granite countertops in kitchen, Kitchen custom cabinets, Kitchen island, Recessed lighting in kitchen, Tile flooring in kitchen, Walk-in pantry, Formal living room, Front living room, Ceiling fan in master bedroom, Master bedroom downstairs, Walk-in closet in master bedroom, 2nd Bedroom = 15x13, 3rd Bedroom = 12x12, 4th Bedroom = 14x12, Alarm system owned, Blinds, Built-in microwave, Carpet, Ceiling fan(s), Central vacuum, Convection oven, Double built-in electric ovens, Electric cooktop, Intercom system, Tile floors", YearBuilt = "2007", Type = 0, Status = 1, Image = "../../images/Gallery/4.jpg" }, new GalleryItem { ID = 5, Address = "61207 16th St N", City = "Moorhead", State = "MN", ZipCode = "56564", Beds = 5, Baths = 4, HouseSize = 14250, LotSize = 1.1, Price = 1700000, Coordinates = "46.88933,-96.7522388", Features = "Dishwasher, Disposal, Separate laundry room, Washer/Dryer on 1st floor, Full bath downstairs, Formal dining room, Downstairs family room, Separate family room, Breakfast Bar/Counter, Breakfast nook (eating area), Granite countertops in kitchen, Kitchen custom cabinets, Kitchen island, Formal living room, Rear living room, Sunken living room, Vaulted ceiling in living room, Balcony in master bedroom, Ceiling fan in master bedroom, Master bedroom separate from other, Master bedroom upstairs, Walk-in closet in master bedroom, 2nd Bedroom = 16X17, 3rd Bedroom = 14X16, 4th Bedroom = 13X13, 5th Bedroom = 12X12, Blinds, Built-in microwave, Carpet, Ceiling fan(s), Central vacuum, Double built-in electric ovens, Gas cooktop, Marble/Stone floors, Pot shelves, Water conditioner owned, Water filtering system, Window Coverings Throughout", YearBuilt = "2010", Type = 0, Status = 0, Image = "../../images/Gallery/5.jpg" }, new GalleryItem { ID = 6, Address = "8512 Tanglewood Cir", City = "Reform", State = "AL", ZipCode = "35487", Beds = 3, Baths = 2, HouseSize = 5600, LotSize = 0.2, Price = 250000, Coordinates = "33.3794,-87.9785788", Features = "Dishwasher, Disposal, Refrigerator, Separate laundry room, Full bath downstairs, Formal dining room, Built-in bookcases in family room, Downstairs family room, Separate family room, Breakfast Bar/Counter, Breakfast nook (eating area), Granite countertops in kitchen, Kitchen custom cabinets, Kitchen island, Marble/Stone flooring in kitchen, Pantry, Formal living room, Front living room, Ceiling fan in master bedroom, Master bedroom downstairs, Master bedroom separate from other, Sitting room in master bedroom, Walk-in closet in master bedroom, 2nd Bedroom = 11X15, 3rd Bedroom = 11X14, Alarm system owned, Blinds, Built-in microwave, Carpet, Ceiling fan(s), Double built-in electric ovens, Drapes, Electric cooktop, Marble/Stone floors, Window Coverings Throughout, Wine refrigerator", YearBuilt = "2011", Type = 0, Status = 0, Image = "../../images/Gallery/6.jpg" }, new GalleryItem { ID = 7, Address = "7121 Bailey St", City = "Worcester", State = "MA", ZipCode = "01605", Beds = 4, Baths = 3, HouseSize = 6900, LotSize = 2.1, Price = 555000, Coordinates = "42.2797,-71.8746388", Features = "Dishwasher, Disposal, Refrigerator, Separate laundry room, Washer/Dryer on 1st floor, Full bath downstairs, Formal dining room, Downstairs family room, Separate family room, Breakfast Bar/Counter, Breakfast nook (eating area), Kitchen island, Recessed lighting in kitchen, Tile countertops in kitchen, Walk-in pantry, Entry foyer, Formal living room, Front living room, Dressing room in master bedroom, Master bedroom separate from other, Master bedroom upstairs, Walk-in closet in master bedroom, 2nd Bedroom = 14x16, 3rd Bedroom = 12x13, 4th Bedroom = 13x14, Carpet, Double built-in electric ovens, Drywall, Gas cooktop, Manmade wood or laminate floors, Marble/Stone floors, Water conditioner loope", YearBuilt = "2008", Type = 0, Status = 1, Image = "../../images/Gallery/7.jpg" }, new GalleryItem { ID = 8, Address = "620201 Plymouth Rd", City = "Detroit", State = "MI", ZipCode = " 48224", Beds = 4, Baths = 4, HouseSize = 7840, LotSize = 0.33, Price = 610000, Coordinates = "42.3716299,-83.2572188", Features = "Dishwasher, Disposal, Refrigerator, Separate laundry room, Full bath downstairs, Formal dining room, 2+ family rooms, Separate family room, Breakfast nook (eating area), Granite countertops in kitchen, Kitchen custom cabinets, Kitchen island, Walk-in pantry, Entry foyer, Formal living room, Rear living room, Vaulted ceiling in living room, Ceiling fan in master bedroom, Master bedroom downstairs, Walk-in closet in master bedroom, 2nd Bedroom = 12x15, 3rd Bedroom = 12x15, 4th Bedroom = 12x15, Blinds, Built-in microwave, Carpet, Ceiling fan(s), Electric cooktop, Shutters, Skylight(s), Water conditioner owned, Water filtering system, Window coverings partial", YearBuilt = "2010", Type = 0, Status = 0, Image = "../../images/Gallery/8.jpg" }, new GalleryItem { ID = 9, Address = "1198 Theresa Cir", City = "Whitinsville", State = "MA", ZipCode = "01582", Beds = 4, Baths = 3, HouseSize = 4990, LotSize = 0.8, Price = 320000, Coordinates = "42.1072,-71.6928888", Features = "Dishwasher, Disposal, Refrigerator, Separate laundry room, Washer/Dryer on 1st floor, 1/2 bath downstairs, Formal dining room, 2+ family rooms, Built-in bookcases in family room, Breakfast Bar/Counter, Granite countertops in kitchen, Kitchen island, Tile flooring in kitchen, Walk-in pantry, Entry foyer, Formal living room, Built-in bookcases in master bedroom, Built-in entertainment center in master bedroom, Ceiling fan in master bedroom, Dressing room in master bedroom, Walk-in closet in master bedroom, 2nd Bedroom = 13x12, 3rd Bedroom = 12x12, 4th Bedroom = 13x12, Alarm system rented, Blinds, Built-in microwave, Carpet, Ceiling fan(s), Double built-in gas ovens, Tile floors, Window Coverings Throughout", YearBuilt = "2011", Type = 0, Status = 0, Image = "../../images/Gallery/9.jpg" } }; } }
.large-text { font-size: 24px; color: #ff6a50; } .opacity { opacity: 0.5; } .images { font-size: 0; } .images > div { display: inline-block; width: 33.3%; vertical-align: top; } .images .item-content { position: relative; margin: 5px; color: #fff; cursor: pointer; } .images .item-content > img { width: 100%; } .item-content .item-options { position: absolute; top: 0; left: 0; height: 100%; width: 100%; } .images .item-content:hover > .item-options { box-shadow: inset 0 0 0 2px #f05b41; } .item-content .item-options > div { position: absolute; bottom: 0; width: 100%; height: 64px; padding-top: 4px; background-color: rgba(19,32,51,0.8); z-index: 1; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; border-left: 2px solid transparent; border-right: 2px solid transparent; } .images .item-content:hover > .item-options > div { border-bottom: 2px solid #f05b41; border-left: 2px solid #f05b41; border-right: 2px solid #f05b41; } .item-content .item-options .address, .item-content .item-options .price { max-width: 70%; padding-left: 8px; } .item-content .item-options .address { font-size: 14px; } .item-content .item-options .agent { font-size: 12px; width: 60px; position: absolute; right: -2px; top: 0; bottom: 0; text-align: center; border-left: 1px solid rgba(255, 255, 255, 0.4); line-height: 13px; } .item-content .item-options .agent > div:hover { color: #f05b41; } .item-content .item-options .agent img { display: block; width: 13px; height: 16px; margin: 8px auto 2px; } .agent-details > img, .agent-details > div { display: inline-block; vertical-align: top; line-height: 26px; } .agent-details > img { width: 40px; margin-right: 10px; } .agent-details .phone { font-size: 18px; } .popup-property-details { overflow: hidden; position: relative; } .popup-property-details .images { width: 700px; } .popup-property-details img { height: 205px; margin: 10px 10px 10px 0; } .dx-button.favorites { background-color: #f05b41; color: #fff; position: absolute; top: 5px; right: 0; } .dx-button.favorites .dx-icon { color: #fff; }