flyclassic22
Technical User
I've a gridview which has
Hyperlinkfield in Second Column,
I'm trying to access the text property, but its returning null
protected void GridView2_RowCommand(object sender, GridViewCommandEventArgs e)
{
int index = Convert.ToInt32(e.CommandArgument);
GridViewRow selectedRow = ((GridView)e.CommandSource).Rows[index];
if (e.CommandName == "AddtoCart") {
Response.Write(selectedRow.Cells[1].Text.ToString());
}
if i'm access from a Boundfield, it will not return a null, how do i solve this?
Hyperlinkfield in Second Column,
I'm trying to access the text property, but its returning null
protected void GridView2_RowCommand(object sender, GridViewCommandEventArgs e)
{
int index = Convert.ToInt32(e.CommandArgument);
GridViewRow selectedRow = ((GridView)e.CommandSource).Rows[index];
if (e.CommandName == "AddtoCart") {
Response.Write(selectedRow.Cells[1].Text.ToString());
}
if i'm access from a Boundfield, it will not return a null, how do i solve this?