Click here to Skip to main content
15,908,264 members
Home / Discussions / Visual Basic
   

Visual Basic

 
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 
AnswerRe: DataGrid Record Loop. Pin
Johan Hakkesteegt28-Aug-07 21:35
Johan Hakkesteegt28-Aug-07 21:35 
Don't panic.

So let's take it a step at a time:
1. Forget about your old loop (For row = 0 To MyDataSet.Tables(0).Rows.Count - 1), its a recepy for disaster.
2. Not really important, but you don't need to write next dr, just next will do.
3. Did adding the column work? Although the loop isn't really working, are you getting any errors pertaining to the dataset? If so, you may have to add a line like MyDataSet.AcceptChanges() right after you added the new column.
4. The bit: x = DateDiff("d", dgOrderReport.Item(0, 3), System.DateTime.Today) won't work. You will have to adapt it also to the new method, something like this:
dim MyDate as Date<br />
MyDate = dr.Item("Column name of the column with the date")<br />
x = MyDate.Substract(Now).Days

Or shorter still:
dim MyDate as Date<br />
MyDate = dr.Item("Column name of the column with the date")<br />
dr.Item("days Late") = MyDate.Substract(Now).Days<br />

5. I didn't quite understand whether you are trying to get the value from dr.Item("days Late") or whether you are trying to register the value of x into dr.Item("days Late"). Either way its easy enough:
Getting: x = dr.Item("days Late") (copy the value of the column to x)
Registering: dr.Item("days Late") = x (copy the value of x to the column)

Hope this works for you,

Johan

My advice is free, and you may get what you paid for.

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 
AnswerRe: Web Services [modified] Pin
nlarson1122-Aug-07 11:24
nlarson1122-Aug-07 11:24 

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.