/// <summary>
 /// Create the cells in the custom row. If the parent columns
 /// datatype is Button, we will create our custom button cell.
 /// If the datatype is something else, we will create the default DataCell.
 ///
 /// We can use both types of cells in our custom row because
 /// the button cell derives from DataCell.
 /// </summary>
 /// <param name="parentColumn"></param>
 /// <returns></returns>
 protected override Cell CreateCell(Column parentColumn)
 {
     if (parentColumn.DataType == typeof(Button))
     {
         ButtonDataCell cell = new ButtonDataCell(parentColumn);
         cell.ButtonClick += new EventHandler<EventArgs>(cell_ButtonClick);
         return cell;
     }
     else
     {
         return base.CreateCell(parentColumn);
     }
 }
 /// <summary>
 /// Create the cells in the custom row. If the parent columns
 /// datatype is Button, we will create our custom button cell.
 /// If the datatype is something else, we will create the default DataCell.
 ///
 /// We can use both types of cells in our custom row because
 /// the button cell derives from DataCell.
 /// </summary>
 /// <param name="parentColumn"></param>
 /// <returns></returns>
 protected override Cell CreateCell(Column parentColumn)
 {
     if (parentColumn.DataType == typeof(Button))
     {
         ButtonDataCell cell = new ButtonDataCell(parentColumn);
         cell.ButtonClick += new EventHandler <EventArgs>(cell_ButtonClick);
         return(cell);
     }
     else
     {
         return(base.CreateCell(parentColumn));
     }
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="template"></param>
 protected ButtonDataCell(ButtonDataCell template)
     : base(template)
 {
     this.ButtonClick = template.ButtonClick;
 }
示例#4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="template"></param>
 protected ButtonDataCell(ButtonDataCell template)
     : base(template)
 {
     this.ButtonClick = template.ButtonClick;
 }