TableExtensions.cs 1.1 KB

12345678910111213141516171819202122232425262728
  1. //using System;
  2. //using System.Collections.Generic;
  3. //using System.Linq;
  4. //using System.Web;
  5. //using System.Web.Mvc.Html;
  6. //using Bowin.Common.JSON;
  7. //using Bowin.Web.Controls.Mvc;
  8. //namespace System.Web.Mvc
  9. //{
  10. // public static class TableExtensions
  11. // {
  12. // public static System.Web.Mvc.MvcHtmlString DataGrid(this System.Web.Mvc.HtmlHelper htmlHelper, DataGridOptions dataGridOptions, IDictionary<string, string> attributes = null)
  13. // {
  14. // var urlHelper = new UrlHelper(htmlHelper.ViewContext.RequestContext);
  15. // if (!string.IsNullOrEmpty(dataGridOptions.DataSourceUrl))
  16. // {
  17. // dataGridOptions.DataSourceUrl = urlHelper.Content(dataGridOptions.DataSourceUrl);
  18. // }
  19. // if (!string.IsNullOrEmpty(dataGridOptions.TitleImgPath))
  20. // {
  21. // dataGridOptions.TitleImgPath = urlHelper.Content(dataGridOptions.TitleImgPath);
  22. // }
  23. // return MvcHtmlString.Create(Bowin.Web.Controls.Mvc.DataGrid.CreateControl(dataGridOptions, attributes).Render());
  24. // }
  25. // }
  26. //}