How to get datagridview cells value at debug mode

Hi All,

I want to check datagridview value at debug mode.

fill_data(dgvRow.Cells("WorkTime").Value.ToString.Substring(0, 5))

How could I do it?

Thank you.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jorge PaulinoIT Pro/DeveloperCommented:
Don't understand your question emi_sastra. Can you clarify it?

I think You would need to check in the DataBound event for the grid (once the data has actually been bound to the grid).

emi_sastraAuthor Commented:
Hi All,

I meant how to check it at debug mode / trace mode ?
Because I can not hover there and get information from it ?

Thank you.
Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.

In debug mode, you could select the code(dgvRow.Cells("WorkTime").Value.ToString.Substring(0, 5)) and then right click on it and click "Add watch" or "Quick Watch" to see the contents.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jorge PaulinoIT Pro/DeveloperCommented:

What version do you use?

If I understand you have the application already on production and you want to get the error information that sometimes occurs, right?

If so, you can create a log file with the stack information of the errors.
Place a breakpoint on the second line. Run in debug mode. When it hits the breakpoint, mouse over strTemp. See code below:

Dim strTemp as String = dgvRow.Cells("WorkTime").Value.ToString.Substring(0, 5)

Open in new window

emi_sastraAuthor Commented:
Hi mohd_haq,

In debug mode, I try to use add watch, but can not see the value ?

Thank you.
emi_sastraAuthor Commented:
Hi jpaulino,

It is still in VS environment.

Thank you.
emi_sastraAuthor Commented:
Hi Zhaolai,

The about ten of it or sometimes even more and I don't want to assign it to variable.

Thank you.
Have you tried to use Column Index instead of Column Name, like this:
fill_data(dgvRow.Cells(0).Value.ToString.Substring(0, 5))

Then in debug mode, highlight dgvRow.Cells(0).Value, then mouse over it. You should be able to see the value.

>>In debug mode, I try to use add watch, but can not see the value ?
Do you see any error?
emi_sastraAuthor Commented:
Yes, I tried it again, it works.

Thank you very much for your help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.