|
using System;
using System.Web.UI.WebControls;
using System.Web.UI;
/* Copyright � 2006 Luis Enrique Ramirez Figueroa. All rights reserved. */
namespace DataCatalogNamespace
{
public class CommandItem : TableRow, INamingContainer
{
public CommandItem()
{
}
protected override void CreateChildControls()
{
TableCell cell = new TableCell();
this.Cells.Add(cell);
cell.ColumnSpan = 2;
Button button = new Button();
cell.Controls.Add(button);
button.CommandName = "Insert";
button.Text = "Insert";
LiteralControl space = new LiteralControl(" ");
cell.Controls.Add(space);
button = new Button();
cell.Controls.Add(button);
button.CommandName = "Update";
button.Text = "Update";
space = new LiteralControl(" ");
cell.Controls.Add(space);
button = new Button();
cell.Controls.Add(button);
button.CommandName = "Delete";
button.Text = "Delete";
}
protected override void AddAttributesToRender(HtmlTextWriter writer)
{
writer.AddAttribute(HtmlTextWriterAttribute.Class, "Command");
}
protected override bool OnBubbleEvent(object source, EventArgs args)
{
CommandEventArgs args1 = args as CommandEventArgs;
if (args1 != null)
{
DataOperationCommandEventArgs args2 = new DataOperationCommandEventArgs(source, args1);
base.RaiseBubbleEvent(this, args2);
return true;
}
return false;
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.