最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
全编辑WebGrid控件LrcGrid(5)―― 构造函数、变量和属性
时间:2022-06-30 10:20:51 编辑:袖梨 来源:一聚教程网
全编辑WebGrid控件LrcGrid(5)―― 构造函数、变量和属性
LrcGrid从System.Web.UI.WebControls.Table继承,实现INamingContainer接口
元数据属性和构造函数:元数据声明了控件的标签和默认属性,构造函数为控件一些属性指定了默认值.
[
ToolboxData("<{0}:LrcGrid runat=server>{0}:LrcGrid>"),
DefaultProperty("SelSql")
]
public class LrcGrid : System.Web.UI.WebControls.Table,INamingContainer
{
public LrcGrid() : base()
{
Font.Name = "verdana";
Font.Size = FontUnit.Point(8);
BackColor = Color.White;
ForeColor = Color.Black;
BorderStyle = BorderStyle.Outset;
Border1px");
PagerStyle = PagerStyle.NextPrev;
CurrentPageIndex = 0;
ItemsPerPage = 15;
TotalPages = -1;
IsPager = true;
}
......
声明私有变量:
和分页相关的私有变量
#region 和分页有关的私有变量
// ***********************************************************************
private string CurrentPageText = "第 {0} 页,共 {1}页";
private string NoPageSelectedText = "无选择页.";
private string QueryPageCommandText = "SELECT * FROM " +
"(SELECT TOP {0} * FROM " +
"(SELECT TOP {1} * FROM ({2}) AS t0 ORDER BY {3} {4}) AS t1 " +
"ORDER BY {3} {5}) AS t2 " +
"ORDER BY {3}";
private string QueryCountCommandText = "SELECT COUNT(*) FROM ({0}) AS t0";
// ***********************************************************************
#endregion
和属性有关的私有变量:
char[] chra = {','};
char[] chrb = {'|'};
//private DataSet _ds;
//private DataTable _dt;
private string tabN;
private string _priKey;
private string _editCol = "1";
LrcGrid从System.Web.UI.WebControls.Table继承,实现INamingContainer接口
元数据属性和构造函数:元数据声明了控件的标签和默认属性,构造函数为控件一些属性指定了默认值.
[
ToolboxData("<{0}:LrcGrid runat=server>{0}:LrcGrid>"),
DefaultProperty("SelSql")
]
public class LrcGrid : System.Web.UI.WebControls.Table,INamingContainer
{
public LrcGrid() : base()
{
Font.Name = "verdana";
Font.Size = FontUnit.Point(8);
BackColor = Color.White;
ForeColor = Color.Black;
BorderStyle = BorderStyle.Outset;
Border1px");
PagerStyle = PagerStyle.NextPrev;
CurrentPageIndex = 0;
ItemsPerPage = 15;
TotalPages = -1;
IsPager = true;
}
......
声明私有变量:
和分页相关的私有变量
#region 和分页有关的私有变量
// ***********************************************************************
private string CurrentPageText = "第 {0} 页,共 {1}页";
private string NoPageSelectedText = "无选择页.";
private string QueryPageCommandText = "SELECT * FROM " +
"(SELECT TOP {0} * FROM " +
"(SELECT TOP {1} * FROM ({2}) AS t0 ORDER BY {3} {4}) AS t1 " +
"ORDER BY {3} {5}) AS t2 " +
"ORDER BY {3}";
private string QueryCountCommandText = "SELECT COUNT(*) FROM ({0}) AS t0";
// ***********************************************************************
#endregion
和属性有关的私有变量:
char[] chra = {','};
char[] chrb = {'|'};
//private DataSet _ds;
//private DataTable _dt;
private string tabN;
private string _priKey;
private string _editCol = "1";
相关文章
- 光遇12.23每日任务怎么做 光遇12月23日每日任务做法攻略 12-23
- 光遇12.23大蜡烛在哪里 光遇12月23日大蜡烛位置攻略 12-23
- 光遇12.23免费魔法有什么 光遇12月23日免费魔法收集攻略 12-23
- 《流放之路2》寻找熔炉任务攻略分享 12-23
- 《流放之路2》德雷文打法技巧分享 12-23
- 《流放之路2》永恒裁判者德雷文具体位置介绍 12-23