Solved

Help with displaying data from data table to multiple controls

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

3 Use Cases for Connected Systems

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

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB 2005 Tooltips on Form Load Event 15 29
VB.net Move a class from Solution Items to a project 2 22
Store results in vb.net 3 20
Winform Module - What is the ASP.Net equiv 2 19
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

785 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