Solved

Help with displaying data from data table to multiple controls

Posted on 2013-12-22
4
165 Views
Last Modified: 2013-12-27
Hi,

How do I modify the code below to display data from dtFTL.Rows(0) to two Textbox controls.

For example, If I have the following text in dtFTL.Rows(0).

+589  This temperatue

I would like to display the first 4 charcaters (+589) to C1FTLA and the remaining text to C1FTLB.


For Each xnFTL As Xml.XmlNode In xdFTL.SelectNodes("/Root/FTLTable[FTL_ID='" & FTLID & "']")
                    FTLID2 = xnFTL.SelectSingleNode("FTL_ID").InnerText
                    Name = xnFTL.SelectSingleNode("FTL").InnerText
                    dtFTL.Rows.Add({FTLID2, Name})
                Next

C1FTL.Text = dtFTL.Rows(0).Item("FTL")



Thanks.
Victor
0
Comment
Question by:vcharles
  • 2
  • 2
4 Comments
 
LVL 62

Accepted Solution

by:
Fernando Soto earned 500 total points
ID: 39734868
If it will always be the first 4 characters of that string then this should do what you need.

C1FTLA.Text = dtFTL.Rows(0).Item("FTL").SubString(0, 4)
C1FTLB.Text = dtFTL.Rows(0).Item("FTL").SubString(5)

Open in new window

0
 

Author Comment

by:vcharles
ID: 39734883
Thank You, will try it and get back to you,
0
 

Author Closing Comment

by:vcharles
ID: 39742774
Thank You!
0
 
LVL 62

Expert Comment

by:Fernando Soto
ID: 39742880
Not a problem, glad to help.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now