ButtonColumn info

S

Steph

Hello,

I have a datagrid dgGrid and want add column depending of a context. I am
usin this following code :

....
while (Clcpt<7)
{
ButtonColumn myCol = new ButtonColumn();
myCol.HeaderText = Clcpt.ToString();
myCol.ButtonType = ButtonColumnType.LinkButton;
myCol.Text = "<img src='images/Add.gif' border=0>";
myCol.CommandName = "cmd"+Clcpt;
Response.Write("cmd"+Clcpt+"/");
dgGrid.Columns.Add(myCol);
Clcpt++;
}
...
Cols are ok but I can't intercept the clik on the button. I have an event
handler dgDrid_ItemCommand but it is never fired ?

Any idea ?

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,225
Members
46,815
Latest member
treekmostly22

Latest Threads

Top