😍 Table 新增 自定义样式Column

* 新增 自定义样式Column
This commit is contained in:
WenLin
2025-04-12 03:06:44 +00:00
committed by Tom
parent 60510cc7e7
commit a506b6d973
3 changed files with 43 additions and 1 deletions

View File

@@ -16,6 +16,7 @@
// CSDN: https://blog.csdn.net/v_132
// QQ: 17379620
using AntdUI;
using System;
using System.Collections.Generic;
using System.Drawing;
@@ -35,7 +36,7 @@ namespace Demo.Controls
table1.Columns = new AntdUI.ColumnCollection {
new AntdUI.ColumnCheck("check").SetFixed(),
new AntdUI.Column("name", "<22><><EFBFBD><EFBFBD>").SetFixed().SetLocalizationTitleID("Table.Column."),
new TestColumn("name", "<22><><EFBFBD><EFBFBD>").SetFixed().SetLocalizationTitleID("Table.Column."),
new AntdUI.ColumnCheck("checkTitle", "<22><>ȫѡ<C8AB><D1A1><EFBFBD><EFBFBD>").SetColAlign().SetLocalizationTitleID("Table.Column."),
new AntdUI.ColumnRadio("radio", "<22><>ѡ").SetLocalizationTitleID("Table.Column."),
new AntdUI.Column("online", "״̬", AntdUI.ColumnAlign.Center).SetLocalizationTitleID("Table.Column."),
@@ -228,6 +229,18 @@ namespace Demo.Controls
#endregion
public class TestColumn : AntdUI.TemplateColumn
{
public TestColumn(string id, string title) : base(id, title) { }
public override ICell GetCellValue(object value)
{
var tagcell = new AntdUI.CellTag(value.ToString(), AntdUI.TTypeMini.Success);
return tagcell;
}
}
public class TestClass : AntdUI.NotifyProperty
{
public TestClass(int index, int start, string name, int age)