ButtonColumn info

Discussion in 'ASP .Net Datagrid Control' started by Steph, Nov 30, 2004.

  1. Steph

    Steph Guest

    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
    Steph, Nov 30, 2004
    #1
    1. Advertising

  2. Steph

    John Guest

    John, Jul 1, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vasanth
    Replies:
    0
    Views:
    529
    Vasanth
    Jun 28, 2004
  2. Andrea Williams

    Clear the Render info & change to different info

    Andrea Williams, Oct 27, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    1,398
    Ken Dopierala Jr.
    Oct 27, 2004
  3. Kiran
    Replies:
    0
    Views:
    1,206
    Kiran
    Feb 6, 2005
  4. ilya

    get CPU info, RAM info

    ilya, Apr 8, 2010, in forum: Java
    Replies:
    43
    Views:
    5,930
    Mike Schilling
    Apr 19, 2010
  5. Kenshin
    Replies:
    1
    Views:
    210
    Jeff Cochran
    Jun 25, 2004
Loading...

Share This Page