How to get the Cell value of datagrid hyperlink column

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • manojsandakelum
    New Member
    • Aug 2011
    • 1

    How to get the Cell value of datagrid hyperlink column

    I have problem with the gridview hyper link field.In the data gridview have data bound field ,hyperlinkfield ,check box column. When i checked the check box i can get the row cell value from bound field but not hyperlink field. It return a null string.
    for (int i = 0; i < GridView1.Rows. Count; i++)
    {

    GridViewRow row = GridView1.Rows[i];
    bool isChecked = ((CheckBox)row. FindControl("Ch eckBox1")).Chec ked;

    if (isChecked)
    {
    string no = GridView1.Rows[i].Cells[1].Text;// this is the hyperlink field
    string name= GridView1.Rows[i].Cells[2].Text;
    string date =GridView1.Rows[i].Cells[3].Text;


    }

    }

    ?? please any idea...
  • milesmajefski
    New Member
    • Aug 2011
    • 10

    #2
    MSDN docs about GridView HyperLinkField Text property
    Maybe the Text property is not set, so maybe the field in the grid is empty?

    Comment

    Working...