Click here to Skip to main content
15,907,497 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionAccessing Custom Controls Dynamically Added Pin
vseven7-Sep-07 10:58
vseven7-Sep-07 10:58 
AnswerRe: Accessing Custom Controls Dynamically Added [modified] Pin
Hadi Hassan7-Sep-07 22:59
Hadi Hassan7-Sep-07 22:59 
GeneralRe: Accessing Custom Controls Dynamically Added [modified] Pin
vseven10-Sep-07 3:02
vseven10-Sep-07 3:02 
GeneralRe: Accessing Custom Controls Dynamically Added Pin
vseven11-Sep-07 2:09
vseven11-Sep-07 2:09 
QuestionHow can I build a String by reading through a Data Grid? Pin
CCG37-Sep-07 9:50
CCG37-Sep-07 9:50 
AnswerRe: How can I build a String by reading through a Data Grid? Pin
Dave Kreskowiak7-Sep-07 9:57
mveDave Kreskowiak7-Sep-07 9:57 
GeneralRe: How can I build a String by reading through a Data Grid? Pin
CCG37-Sep-07 10:04
CCG37-Sep-07 10:04 
AnswerRe: How can I build a String by reading through a Data Grid? Pin
Trupti Mehta9-Sep-07 23:01
Trupti Mehta9-Sep-07 23:01 
Hi,

To set a String with tabs, try the following code. Its a modified version of what Dave provided.

<br />
Dim mainStr as String = ""<br />
Dim rowStr as String = ""<br />
 <br />
For Each r As DataGridViewRow in DataGridView1.Rows<br />
    rowStr = ""<br />
    For Each c As DataGridViewCell in r<br />
         If (c.ColumnIndex > 0) Then<br />
             rowStr += ControlChars.Tab<br />
         End If<br />
         rowStr += c.Value.ToString()<br />
    Next<br />
    mainStr += rowStr + ControlChars.CrLf<br />
Next<br />


This code will produce the results as u wanted i.e.

CCG3 wrote:
Row1Value1(tab) Row1Value2(tab) Row1Value3
Row2Value1(tab) Row2Value2(tab) Row2Value3



Hope this helps to your expectations.



Thanks

Terry

QuestionTrimming a String Pin
Ravi Mahavrathayajula7-Sep-07 9:35
Ravi Mahavrathayajula7-Sep-07 9:35 
AnswerRe: Trimming a String Pin
Dave Kreskowiak7-Sep-07 9:36
mveDave Kreskowiak7-Sep-07 9:36 
AnswerRe: Trimming a String Pin
Kschuler7-Sep-07 9:39
Kschuler7-Sep-07 9:39 
GeneralRe: Trimming a String Pin
Dave Kreskowiak7-Sep-07 9:45
mveDave Kreskowiak7-Sep-07 9:45 
GeneralRe: Trimming a String Pin
Ravi Mahavrathayajula7-Sep-07 10:04
Ravi Mahavrathayajula7-Sep-07 10:04 
GeneralRe: Trimming a String Pin
Ravi Mahavrathayajula7-Sep-07 10:04
Ravi Mahavrathayajula7-Sep-07 10:04 
AnswerRe: Trimming a String Pin
nishkarsh_k8-Sep-07 9:23
nishkarsh_k8-Sep-07 9:23 
QuestionPrinting a bound datagrid usint new DataGridViewPrint class Pin
2wit2woo7-Sep-07 8:03
2wit2woo7-Sep-07 8:03 
AnswerRe: Printing a bound datagrid usint new DataGridViewPrint class Pin
Dave Kreskowiak7-Sep-07 8:32
mveDave Kreskowiak7-Sep-07 8:32 
GeneralRe: Printing a bound datagrid usint new DataGridViewPrint class Pin
2wit2woo7-Sep-07 8:54
2wit2woo7-Sep-07 8:54 
GeneralRe: Printing a bound datagrid usint new DataGridViewPrint class Pin
Dave Kreskowiak7-Sep-07 9:30
mveDave Kreskowiak7-Sep-07 9:30 
Questiondatagrid cell focus Pin
ggreekggod7-Sep-07 6:49
ggreekggod7-Sep-07 6:49 
AnswerRe: datagrid cell focus Pin
Dave Kreskowiak7-Sep-07 9:35
mveDave Kreskowiak7-Sep-07 9:35 
QuestionWhat is Wrong with the Following Code.Adding records in DB Pin
Vimalsoft(Pty) Ltd7-Sep-07 6:36
professionalVimalsoft(Pty) Ltd7-Sep-07 6:36 
AnswerRe: What is Wrong with the Following Code.Adding records in DB Pin
Manuel F. Hernandez7-Sep-07 6:55
Manuel F. Hernandez7-Sep-07 6:55 
GeneralRe: What is Wrong with the Following Code.Adding records in DB Pin
Vimalsoft(Pty) Ltd7-Sep-07 7:41
professionalVimalsoft(Pty) Ltd7-Sep-07 7:41 
GeneralRe: What is Wrong with the Following Code.Adding records in DB Pin
Manuel F. Hernandez7-Sep-07 8:02
Manuel F. Hernandez7-Sep-07 8:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.