Solved

Help with displaying data from data table to multiple controls

Posted on 2013-12-22
4
179 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
c#, case, if 4 37
Help with Report Viewer in VS2013 6 33
Suppress if value zero or NULL in crystal report 2 41
Need Help With GDI+ in VB.Net 8 40
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

734 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