Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Adding a ButtonColumn to a DataGrid in a Custom Control

Thread Tools

Adding a ButtonColumn to a DataGrid in a Custom Control

Posts: n/a
I am trying to add a buttoncolumn to a Datagrid I am dynamicaly adding
to a custom control (code below). The Datagrid outputs fine but all of
the entries in the button column are just text, no link. The source
for the entries looks like <a>build</a>. Any help would be great.

TreeTable = new DataGrid();

TreeTable.DataSource = dal.GetDataViewSql("SELECT * FROM tblAIs left
join tblNodes on").Table; //this is our
custom data accessor

ButtonColumn buildColumn = new ButtonColumn();
buildColumn.ButtonType = ButtonColumnType.PushButton;
buildColumn.DataTextField = "ID";

TreeTable.ItemCommand += new
DataGridCommandEventHandler(TreeTable_ItemCommand) ;
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ButtonColumn not firing after dynamically adding a row to my datagrid. aliciahogue ASP .Net 0 10-20-2009 06:02 PM
Adding "delete" functionality in DataGrid - without a ButtonColumn PK9 ASP .Net Datagrid Control 5 02-17-2005 02:41 PM
Adding buttons in a ButtonColumn in a DataGrid a row at a time Adam White ASP .Net 1 11-22-2004 04:20 PM
Getting Control ID of buttons in Buttoncolumn in a Datagrid DotNetJunkies User ASP .Net 3 07-07-2004 01:31 PM
ControlDesigner not invoked on custom control when control is rendered within another custom control Matt Sokol ASP .Net Building Controls 2 08-07-2003 07:13 AM