Пример #1
0
        /// <summary>
        /// 配置单选框列头
        /// </summary>
        private void ConfigRadioHeader(TagBuilder builder)
        {
            var headerCellBuilder = new HeaderCellBuilder();

            headerCellBuilder.AppendContent(GetRadioTitle());
            builder.AppendContent(headerCellBuilder);
        }
Пример #2
0
        /// <summary>
        /// 配置复选框列头
        /// </summary>
        private void ConfigCheckboxHeader(TagBuilder builder)
        {
            var checkBoxBuilder = new CheckBoxBuilder();

            checkBoxBuilder.AddAttribute("(change)", $"$event?{_tableId}.masterToggle():null");
            checkBoxBuilder.AddAttribute("[disabled]", $"!{_tableId}.dataSource.data.length");
            checkBoxBuilder.AddAttribute("[checked]", $"{_tableId}.isMasterChecked()");
            checkBoxBuilder.AddAttribute("[indeterminate]", $"{_tableId}.isMasterIndeterminate()");
            var headerCellBuilder = new HeaderCellBuilder();

            headerCellBuilder.AppendContent(checkBoxBuilder);
            builder.AppendContent(headerCellBuilder);
        }