<asp:gridview id="GridView1" runat="server" autogeneratecolumns="false" datakeynames="tprice,tquantity" onselectedindexchanged="GridView1_SelectedIndexChanged" xmlns:asp="#unknown">
<columns>
<asp:commandfield showselectbutton="true" />
</columns>
</asp:gridview>
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
string tprice2 = Server.HtmlDecode(GridView1.SelectedDataKey["tprice"].ToString());
string tquantity1 = Server.HtmlDecode(GridView1.SelectedDataKey["tquantity"].ToString());
}