locked
BoundField Value in Gridview RRS feed

  • Question

  • User-1499457942 posted

    Hi

      I have written below code . I want that instead of Index [2] Field Name should be given

    string m_Catg = e.Row.Cells[2].Text;

    Thanks

    Friday, August 10, 2018 5:50 AM

Answers

  • User-1716253493 posted
    string m_Catg = string.Format("{0}", DataBinder.Eval(e.Row.DataItem, "fieldname"));

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 10, 2018 6:56 AM