Solved

Help with displaying data from data table to multiple controls

Posted on 2013-12-22
4
176 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 63

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 63

Expert Comment

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

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

735 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