0

I wanted to get Grid Data Item in asp.net grid.In the similar procedure already i did in telerik like this,

 GridDataItem dataItem = (GridDataItem)e.Item; <-- this is Telerik Grid

I want the equivelent of the asp.net Grid

I need to do it for the below code,

 protected void gvTestRes_RowCommand(object sender, GridViewCommandEventArgs e)
{


    if (e.CommandName == "pdf")
    {
         //GridDataItem dataItem = (GridDataItem)e.Item;
    }
}

1 Answer 1

1

I found it.Here i paste it for sometimes it maybe helpful to others

 string Id = gvBaptist.DataKeys[Convert.ToInt32(e.CommandArgument)].Value.ToString();
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.