ControlExample.cshtml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. @model EMIS.ViewModel.UniversityView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. <!DOCTYPE html>
  5. <html>
  6. <head>
  7. <meta name="viewport" content="width=device-width" />
  8. <title>ControlExample</title>
  9. </head>
  10. <body>
  11. <div>
  12. @Html.ComboGridFor(x => x.PropertyID, new ComboGridOptions {
  13. TextField = "Name",
  14. ValueField = "Code",
  15. GridOptions = new DataGridOptions
  16. {
  17. Columns = new List<DataGridColumn>()
  18. {
  19. new CheckBoxFieldColumn{ HeaderText="", FieldName="UniversityID"},
  20. new LinkButtonColumn { FieldName="Code", HeaderText="学校代码", Width=0.1, Align=AlignStyle.Center , Handle="edit" },
  21. new BoundFieldColumn { FieldName="Name", HeaderText="学校名称", Width=0.3, Align=AlignStyle.Center },
  22. new BoundFieldColumn { FieldName="EnglishName", HeaderText="英文名称", Width=0.1, Align=AlignStyle.Center },
  23. new BoundFieldColumn { FieldName="SimpleName", HeaderText="学校简称", Width=0.1, Align=AlignStyle.Center },
  24. },
  25. IsCheckOnSelect = true,
  26. DataSourceUrl = Url.Content("~/University/List"),
  27. IsPagination = true,
  28. IsShowRowNumbers = true,
  29. IsSingleSelect = false
  30. }
  31. })
  32. </div>
  33. </body>
  34. </html>