protected void AppendTopToolBar(IHtmlNode div, GridFunctionalData functionalData) { if (functionalData.ShowTopToolBar) { var toolBar = CreateToolBar(functionalData.ToolBarData); toolBar.AddClass("t-grid-top").AppendTo(div); } }
public virtual IHtmlNode CreateGrid(IDictionary<string, object> htmlAttributes, GridFunctionalData functionalData, GridRenderingData renderingData) { var div = CreateWrapper(htmlAttributes); AppendTopToolBar(div, functionalData); AppendGroupHeader(div, functionalData); AppendTopPager(div, functionalData); AppendData(div, renderingData); AppendBottomToolBar(div, functionalData); AppendBottomPager(div, functionalData); return div; }
protected void AppendTopPager(IHtmlNode div, GridFunctionalData functionalData) { if (functionalData.ShowTopPager) { var pager = new HtmlElement("div").AddClass("t-grid-pager", "t-grid-top"); pager.AppendTo(div); AppendRefreshButton(pager, functionalData.PagerData); CreateTopPager(functionalData.PagerData).AppendTo(pager); } }
protected virtual IHtmlNode CreateGroupHeader(GridFunctionalData functionalData) { return FunctionalSectionBuilder.CreateGroupHeader(functionalData.GroupingData); }
protected void AppendGroupHeader(IHtmlNode div, GridFunctionalData functionalData) { if (functionalData.ShowGroupHeader) { var groupHeader = CreateGroupHeader(functionalData); groupHeader.AppendTo(div); } }