Loading grid view when button in datalist is clicked (inside item template)
i am having a grid view and a datalist view .both are under update panel. In datalist i am having a button in itemtemplate which is having follwing code and i have to populate gridview with same values like in datalist.<itemtemplate>
<asp:Button ID="testing" CausesValidation="false" runat="server" OnClientClick='<%#String.Format("return SetItemDetails({0},'{1}','{2}','{3}','{4}')", Eval("ItemId"), Eval("ItemName"),Eval("Cost"),Eval("Dateofexpire"),Eval("Quantity"), Eval("Units"),Eval("UnitPrice"),Eval("Location"),Eval("Description")) %>' OnClick="testing_Click" Height="35px" Width="100%" Text='<%#"("+ DataBinder.Eval(Container.DataItem, "ItemName")+")"+" (Price:"+ DataBinder.Eval(Container.DataItem, "UnitPrice")+")"+" (Qty:"+ DataBinder.Eval(Container.DataItem, "Quantity")+")"+" (units:"+ DataBinder.Eval(Container.DataItem,"Units")+")"+" (Location:" + DataBinder.Eval(Container.DataItem,"Location")%>'
CommandArgument='<%#Eval("ItemId") %>' ToolTip ='<%#"Qty:" +"("+ DataBinder.Eval(Container.DataItem, "Quantity")+")"+ " Location:" + DataBinder.Eval(Container.DataItem,"location")+ " Units:" + DataBinder.Eval(Container.DataItem,"Units")%>'/>
What I have tried:
i have working with itemcommand with command argument but gridview is not loading..