c# - Issue related to ItemCommand event in DataGrid asp.net -


i have asp.net application having datagrid on aspx page having autogenerated columns :

i have bound itemcommand event on grid following :

 protected void datagrid2_itemcommand(object sender, system.web.ui.webcontrols.datagridcommandeventargs e)         {             if (e.commandname == "checkinventoryandprice")             {                   string itemmainpagelink = e2wconstants.pages.item_main;                 string itemid = (datarowview)e.item.dataitem).row["itemid"].tostring();                  //response.redirect();             }         } 

but getting dataitem null : how can value of cell of selected row ??

thanks..


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -