public static string RenderHtml(JQGrid grid, JQGridRenderMode mode) { if (string.IsNullOrEmpty(grid.ID)) { throw new Exception("You need to set ID for this grid."); } string text = ""; if (mode == JQGridRenderMode.Full || mode == JQGridRenderMode.Partial) { text = "<table id=\"{0}\"></table>"; if (grid.ToolBarSettings.ToolBarPosition != ToolBarPosition.Hidden) { text += "<div id=\"{0}_pager\"></div>"; } text = string.Format(text, grid.ID); } if (mode == JQGridRenderMode.Full || mode == JQGridRenderMode.Script) { if (grid.HierarchySettings.HierarchyMode == HierarchyMode.Child || grid.HierarchySettings.HierarchyMode == HierarchyMode.ParentAndChild) { text += GetChildSubGridJavaScript(grid); } else { text += GetStartupJavascript(grid, false); } } return(text); }
public static string RenderHtml <T>(JQGrid grid, JQGridRenderMode mode) where T : class { JQGrid gridT = grid as JQGrid; return(RenderHtml(gridT, mode)); }