handling events in template columns created dyanmically

Discussion in 'ASP .Net' started by =?Utf-8?B?cmVk?=, Nov 25, 2004.

  1. i have a template column for datagrid created dynamically in which i have a
    image button

    i am able to display the images for the imagebuttons from datatable but not
    able to generate the image button click event .


    1)mygrid.ItemCommand += new DataGridCommandEventHandler(my_fucntion);

    2)img.CommandName = "iclick";

    3)public void my_function(object sender, DataGridCommandEventArgs e)
    {
    if(e.commandname = "iclick"
    {
    ......................
    ................
    }
    }
    but
    when i click on the imagebutton i cannot reach to step 3



    thanks
    red
    =?Utf-8?B?cmVk?=, Nov 25, 2004
    #1
    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. phl
    Replies:
    3
    Views:
    3,803
    bruce barker
    Dec 22, 2004
  2. Nathan Sokalski

    Handling Events for Dynamically Created Controls

    Nathan Sokalski, May 23, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    971
    Herfried K. Wagner [MVP]
    May 23, 2005
  3. Mark
    Replies:
    3
    Views:
    486
    Mark Rae
    Jan 8, 2007
  4. writeson
    Replies:
    0
    Views:
    290
    writeson
    Mar 20, 2008
  5. Replies:
    1
    Views:
    320
    Teemu Keiski
    Apr 17, 2006
Loading...

Share This Page