if(( data ==
break;
default:break;
}
}
}
// <summary>
// 定義控件的屬性readOnly
// </summary>
private bool readOnly = true;
}
類CheckBoxColumn繼承於模板列TemplateColumn
public class CheckBoxColumn :System
{
// <summary>
// 初始化CheckBoxColumn
// </summary>
public CheckBoxColumn(String Name)
{
//設置控件為只讀
viewItem = new CheckBoxItem(false
this
//設置控件為可編輯的
editItem = new CheckBoxItem(true
this
}
// <summary>
// 初始化CheckBoxColumn
// </summary>
public CheckBoxColumn(bool ImmediatePostback
{
//設置控件為只讀
viewItem = new CheckBoxItem(ImmediatePostback
this
//設置控件為可編輯的
editItem = new CheckBoxItem(true
this
AutoPostBack = ImmediatePostback;
}
// <summary>
// 設置控件CheckBoxColumn的事件
// </summary>
[
From:http://tw.wingwit.com/Article/program/net/201311/15046.html