Can you expand on the detail of the approach you used as I'm trying this using a grid view and have some code where I'm trying to extract a GUID value which is a hidden column on a grid view. I use the code below
protected void usersGridView_SelectedIndexChanged(object sender, EventArgs e)
{
foreach (Control gridControl in usersGridView.Rows[usersGridView.SelectedIndex].Controls)
{
if (gridControl is DataControlFieldCell)
{
DataControlFieldCell nameFieldCell = gridControl as DataControlFieldCell;
if (nameFieldCell.ContainingField.HeaderText == "UserGuid")
{
eGuid userGuid = new Guid(nameFieldCell.Text);
AspnetMembershipEntity userMember = new AspnetMembershipEntity(userGuid);
telephoneNoTextBox.Text = userMember.User.TelephoneNo;
nameTextBox.Text = userMember.UserName;
}
}
}
}
I also have defined the column using the ASPX markup as below
<asp:BoundField DataField="UserId" HeaderText="UserGuid" SortExpression="UserGuid"
Visible="False" />
Is this the correct approach, if so how do I access values such as this?