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
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