Get GridView Bound Field value

S

shapper

Hello,

I have looping through a GridView rows as follows:

For Each gvrLevel As GridViewRow In gvLevels.Rows
...
Next gvrLevel

How can I get the value of a BoundField named "Description" in each
row?

Thanks,

Miguel
 
S

shapper

Hello,

I have looping through a GridView rows as follows:

For Each gvrLevel As GridViewRow In gvLevels.Rows
...
Next gvrLevel

How can I get the value of a BoundField named "Description" in each
row?

Thanks,

Miguel

Hello,

I was able to retrieve it using the following:
gvrLevel.Cells(0).Text

The problem is that the Bound Field of index 0 is just a primary key
so I have its visibility set to false.
So the expression gvrLevel.Cells(0).Text returns "".

If I set visible to True the expression gvrLevel.Cells(0).Text will
return the correct value.

How can I get the value without needing to have a column visible?

Thanks,
Miguel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top