@using GreenTree.Nachtragsmanagement.Web.Extensions @model IEnumerable
@Html.DevExpress().PopupControl(s => { s.Name = "devPopupControlAssignDeviation"; s.Modal = false; s.Width = new Unit(350, UnitType.Pixel); s.CloseAction = CloseAction.OuterMouseClick; s.PopupHorizontalAlign = PopupHorizontalAlign.OutsideRight; s.PopupVerticalAlign = PopupVerticalAlign.TopSides; s.AllowDragging = false; s.AllowResize = false; s.ShowFooter = false; s.ShowHeader = false; s.ShowOnPageLoad = false; s.SetContent(() => { ViewContext.Writer.Write(""); Html.DevExpress().ListBox(t => { t.Name = "devListBoxAssignDeviation"; t.Width = new Unit(100, UnitType.Percentage); t.Height = new Unit(150, UnitType.Pixel); t.Properties.ValueField = "Id"; t.Properties.ValueType = typeof(int); t.SetItemTemplateContent(c => { var id = Convert.ToInt32(DataBinder.Eval(c.DataItem, "Id")); var customNumber = Convert.ToInt32(DataBinder.Eval(c.DataItem, "CustomNumber")); var description = DataBinder.Eval(c.DataItem, "Description").ToString(); if (id == -1) ViewContext.Writer.Write(description); else ViewContext.Writer.Write("NT - {0} - {1}", customNumber, description); }); t.ControlStyle.Border.BorderStyle = BorderStyle.None; }).BindList(Model).Render(); Html.RenderPartial( "~/Views/Shared/_PopupButtonPanel.cshtml", new GreenTree.Nachtragsmanagement.Web.Models.Global.PopupModel { PopupName = "devPopupControlAssignDeviation", AcceptFunction = "function (s, e) { assignDeviation(); }" } ); }); s.Styles.Content.Paddings.Padding = new Unit(0); s.Styles.ModalBackground.Opacity = 0; }).GetHtml()