コード例 #1
0
        /// <summary>
        /// All grids use this
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="html"></param>
        /// <param name="gridSpec"></param>
        /// <param name="gridName"></param>
        /// <param name="optionalGridDataUrl"></param>
        /// <param name="styleString"></param>
        /// <param name="dhtmlxGridResizeType"></param>
        /// <returns></returns>
        public static HtmlString DhtmlxGrid <T>(this HtmlHelper html, GridSpec <T> gridSpec, string gridName, string optionalGridDataUrl, string styleString, DhtmlxGridResizeType dhtmlxGridResizeType)
        {
            var dhtmlxGridHeader = DhtmlxGridHtmlHelpers.BuildDhtmlxGridHeader(gridSpec, gridName, ExcelDownloadWithFooterUrl, ExcelDownloadWithoutFooterUrl);

            var dhtmlxGrid = DhtmlxGridHtmlHelpers.DhtmlxGridImpl(gridSpec,
                                                                  gridName,
                                                                  optionalGridDataUrl,
                                                                  $"background-color:white;{styleString}",
                                                                  null, dhtmlxGridHeader, dhtmlxGridResizeType);

            return(new HtmlString(dhtmlxGrid));
        }
コード例 #2
0
        /// <summary>
        /// All grids use this
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="html"></param>
        /// <param name="gridSpec"></param>
        /// <param name="gridName"></param>
        /// <param name="optionalGridDataUrl"></param>
        /// <param name="styleString"></param>
        /// <param name="dhtmlxGridResizeType"></param>
        /// <returns></returns>
        public static HtmlString DhtmlxGrid <T>(this HtmlHelper html, GridSpec <T> gridSpec, string gridName, string optionalGridDataUrl, string styleString, DhtmlxGridResizeType dhtmlxGridResizeType)
        {
            var dhtmlxGridHeader = DhtmlxGridHtmlHelpers.BuildDhtmlxGridHeader(gridSpec, gridName, ExcelDownloadUrl);

            var saveGridSettingsUrl = SitkaRoute <GridSettingsController> .BuildUrlFromExpression(c => c.SaveGridSettings());

            var dhtmlxGrid = DhtmlxGridHtmlHelpers.DhtmlxGridImpl(gridSpec,
                                                                  gridName,
                                                                  optionalGridDataUrl,
                                                                  $"background-color:white;{styleString}",
                                                                  null, dhtmlxGridHeader, dhtmlxGridResizeType, saveGridSettingsUrl);

            return(new HtmlString(dhtmlxGrid));
        }