本文整理汇总了C#中DataControlRowState类的典型用法代码示例。如果您正苦于以下问题:C#DataControlRowState类的具体用法?C#DataControlRowState怎么用?C#DataControlRowState使用的例子?这里精选的类代码示例或许可以为您提供帮助。
示例1:InitializeCell
publicoverridevoidInitializeCell(DataControlFieldCellcell,DataControlCellTypecellType,DataControlRowStaterowState,introwIndex)
{
base.InitializeCell(cell,cellType,rowState,rowIndex);
if(ColumnStyle!=null)
{
if(HeaderStyle.CssClass.IsNullOrEmpty())HeaderStyle.CssClass=ColumnStyle;
if(ItemStyle.CssClass.IsNullOrEmpty())ItemStyle.CssClass=ColumnStyle;
if(FooterStyle.CssClass.IsNullOrEmpty())FooterStyle.CssClass=ColumnStyle;
}
if(cellType!=DataControlCellType.DataCell)return;
ButtonExbuttonEx=string.IsNullOrEmpty(Message)?newButtonEx():newMessageButton{Message=Message};
buttonEx.CommandName=CommandName;
buttonEx.ToolTip=ResourceManager.GetString(ToolTip);
buttonEx.LeftIconCssClass=IconName==null?string.Empty:IconName.Name;
buttonEx.ShowText=false;
buttonEx.OnClientClick=OnClickClick;
if(Click!=null)
{
if(buttonExisMessageButton)
((MessageButton)buttonEx).Confirm+=Click;
else
buttonEx.Click+=Click;
}
cell.Controls.Add(buttonEx);
}
原文链接:
http://www.jxszl.com/biancheng/C/556860.html