mirror of
https://gitee.com/AntdUI/AntdUI.git
synced 2026-04-02 19:50:45 +08:00
😍 Table 新增 自定义样式Column
* 新增 自定义样式Column
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user