Retreive values from row in Datagrid

I have one datagrid  and   textboxes namely student name, student Id and student add, student visit date.
\
Now   the user say enters either of the value in text boxes.............
based on that, i am  displaying the search in datagrid...
Now i want that when the user  selects any of the rows from datagrid , the values   will be displayed in the text boxes ( as i have mentioned  above)

 and  at the same  the search results remain in the  datagrid.. since this provides the user that he can select any other rows also......


Please  tell  me  in VB urgently
rajender123Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

abdulhameedsCommented:
display thecontent of datagrid values to text box
text1.text= datagrid1.columns(0).text
text2.text= datagrid1.columns(1).text

0
rajender123Author Commented:
Thanks  abdul...
but if th value is null in the datagrid it is showing the Type mismatch error...
how will i  get that value  that this is null/../..
how will i retreive that value..

please let me know
0
abdulhameedsCommented:
ok you can put on error resume next


private sub B1_click ()
on error resume next
text1.text= datagrid1.columns(0).text
text2.text= datagrid1.columns(1).text
end sub
so you can put the error resume on the top of sub
0

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
rajender123Author Commented:
Thanks my problem is solved now...
0
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 Classic

From novice to tech pro — start learning today.