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

Visual Basic

 
QuestionDataGrid Record Loop. Pin
Smokeywade22-Aug-07 8:27
Smokeywade22-Aug-07 8:27 
AnswerRe: DataGrid Record Loop. Pin
jchigg200022-Aug-07 9:00
jchigg200022-Aug-07 9:00 
GeneralRe: DataGrid Record Loop. Pin
Smokeywade22-Aug-07 9:49
Smokeywade22-Aug-07 9:49 
GeneralRe: DataGrid Record Loop. Pin
jchigg200022-Aug-07 10:14
jchigg200022-Aug-07 10:14 
GeneralRe: DataGrid Record Loop. Pin
Smokeywade22-Aug-07 10:38
Smokeywade22-Aug-07 10:38 
GeneralRe: DataGrid Record Loop. Pin
Johan Hakkesteegt23-Aug-07 2:06
Johan Hakkesteegt23-Aug-07 2:06 
GeneralRe: DataGrid Record Loop. Pin
Smokeywade23-Aug-07 4:10
Smokeywade23-Aug-07 4:10 
QuestionRe: DataGrid Record Loop. Pin
Smokeywade23-Aug-07 10:00
Smokeywade23-Aug-07 10:00 
So I'm still trying with this disaster loop...no luck,
I've moved things around a bit. For less confusion that I may be having...

'I create My Dynamic Data Column - Days Late
Dim dc As DataColumn
dc = New DataColumn("Days Late")
MyDataSet.Tables(0).Columns.Add(dc)

'Create my variables
Dim x As Integer
Dim row As Integer = 0

'This is my loop that does not go to the next record
For row = 0 To MyDataSet.Tables(0).Rows.Count - 1
x = DateDiff("d", dgOrderReport.Item(row, 3), System.DateTime.Today)
'Place Result into "Days late" Column
dc.Expression = x
Next row

I believe I'm missing row =+ 1 - but when I put this within my loop I get the infinite loop - I need to exit that for correct? Will this give me the results I need.?.

I've also tried it this way
'I create My Dynamic Data Column - Days Late
Dim dc As DataColumn
dc = New DataColumn("Days Late")
MyDataSet.Tables(0).Columns.Add(dc)

Dim dr As DataRow
Dim x As Integer

For Each dr In MyDataSet.Tables(0).Rows
x = DateDiff("d", dgOrderReport.Item(0, 3), System.DateTime.Today)
~~~~I have problems here - how will I give the column the value of x???
dc.Expression = dr.Item("days Late")
next dr

What is the best way to do this?

Thank You
AnswerRe: DataGrid Record Loop. Pin
Johan Hakkesteegt28-Aug-07 21:35
Johan Hakkesteegt28-Aug-07 21:35 
QuestionCross-thread operation not valid. Please plz Help Pin
TechPrince22-Aug-07 8:07
TechPrince22-Aug-07 8:07 
AnswerRe: Cross-thread operation not valid. Please plz Help Pin
Dave Kreskowiak23-Aug-07 3:23
mveDave Kreskowiak23-Aug-07 3:23 
QuestionHow associate different event handler at runtime Pin
Amer Rehman22-Aug-07 7:25
Amer Rehman22-Aug-07 7:25 
AnswerRe: How associate different event handler at runtime Pin
kubben22-Aug-07 8:34
kubben22-Aug-07 8:34 
AnswerRe: How associate different event handler at runtime Pin
Luc Pattyn22-Aug-07 14:19
sitebuilderLuc Pattyn22-Aug-07 14:19 
QuestionMultidimension arrays and gridview Pin
shrihit22-Aug-07 6:55
shrihit22-Aug-07 6:55 
AnswerRe: Multidimension arrays and gridview Pin
San@Coding22-Aug-07 17:40
San@Coding22-Aug-07 17:40 
AnswerRe: Multidimension arrays and gridview Pin
San@Coding22-Aug-07 17:44
San@Coding22-Aug-07 17:44 
QuestionBatch Crystal Reports Pin
ryan11722-Aug-07 6:36
ryan11722-Aug-07 6:36 
QuestionDraging a control within a control on windows form Pin
BooleanTrue22-Aug-07 5:29
professionalBooleanTrue22-Aug-07 5:29 
AnswerRe: Draging a control within a control on windows form Pin
Christian Graus22-Aug-07 12:56
protectorChristian Graus22-Aug-07 12:56 
GeneralRe: Draging a control within a control on windows form Pin
BooleanTrue23-Aug-07 0:48
professionalBooleanTrue23-Aug-07 0:48 
Questionshell command problems Pin
plural22-Aug-07 5:23
plural22-Aug-07 5:23 
AnswerRe: shell command problems Pin
Craster22-Aug-07 5:56
Craster22-Aug-07 5:56 
GeneralRe: shell command problems Pin
plural22-Aug-07 6:22
plural22-Aug-07 6:22 
QuestionWeb Services Pin
susheel7422-Aug-07 5:17
susheel7422-Aug-07 5:17 

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.