I have a labels that need values retreieved from a Database.
I am able to query the database but how can I extract values from a DataTable and place them in the appropiate labels
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In DataTable you have rows and columns. To select a particular cell you need to do this:
This will set the label1 text to Row 0, Column 0 value.
To iterate through each row use:
This will print values for columns against each row. In this code you need to replace string for columnname (e.g. ColumnName1) with your column names