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
Post a Comment