Click here to Skip to main content
15,897,518 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: date variable to string variable Pin
Mark Churchill21-Aug-07 21:07
Mark Churchill21-Aug-07 21:07 
QuestionHelp how do you loop thru each record in DataGrid Pin
Smokeywade21-Aug-07 11:06
Smokeywade21-Aug-07 11:06 
AnswerRe: Help how do you loop thru each record in DataGrid Pin
Christian Graus21-Aug-07 11:18
protectorChristian Graus21-Aug-07 11:18 
GeneralRe: Help how do you loop thru each record in DataGrid Pin
Smokeywade21-Aug-07 12:12
Smokeywade21-Aug-07 12:12 
GeneralRe: Help how do you loop thru each record in DataGrid Pin
Christian Graus21-Aug-07 12:50
protectorChristian Graus21-Aug-07 12:50 
GeneralRe: Help how do you loop thru each record in DataGrid Pin
Smokeywade21-Aug-07 13:26
Smokeywade21-Aug-07 13:26 
GeneralRe: Help how do you loop thru each record in DataGrid Pin
Christian Graus21-Aug-07 13:43
protectorChristian Graus21-Aug-07 13:43 
GeneralRe: Help how do you loop thru each record in DataGrid Pin
Smokeywade22-Aug-07 3:51
Smokeywade22-Aug-07 3:51 
I now understand exactly what you mean about not referencing 'rec' within my loop - I wasn't able to successfully reference it because of the lack of knowledge I have with the Class I was using so I changed the code just a bit -
I decided to use a the currency manager to count each row, and I'm now using a do while - now my problem is my specified cast is not valid - which I'm assuming is because I'm using the wrong class for rec to compare it to my datagrid...Help will be great - Thanks...


Dim rec As Object

Dim cm As CurrencyManager = CType(BindingContext(dgOrderReport.DataSource), CurrencyManager)
Dim rowcount As Integer = cm.Count
Dim row As Integer = 0

Do While row < rowcount
For Each rec In dgOrderReport.Item(row, 3)

Select Case DatePart("w", d1)

Case 1
subtract = subtract + 1
Case 7
subtract = subtract + 2
End Select

Select Case DatePart("w", d2)
Case 1
subtract = subtract + 2
Case 7
subtract = subtract + 1
End Select

absday = DateDiff("d", d1, d2) + 1 - subtract

fncGetDays = absday - CInt(2 * (absday \ 7))

If fncGetDays < 0 Then fncGetDays = 0
row = +1
Next rec
Loop<code></code><code></code>

Thank You
QuestionHo to generate *.chm file from html files Pin
Jahnson K21-Aug-07 10:38
Jahnson K21-Aug-07 10:38 
AnswerRe: Ho to generate *.chm file from html files Pin
Paul Conrad26-Aug-07 9:31
professionalPaul Conrad26-Aug-07 9:31 
AnswerRe: Ho to generate *.chm file from html files Pin
reto.knaak14-Jan-11 4:11
reto.knaak14-Jan-11 4:11 
QuestionVB.Net/ADO.NET question on populating a gridview Pin
Jordan Martz21-Aug-07 10:16
Jordan Martz21-Aug-07 10:16 
AnswerRe: VB.Net/ADO.NET question on populating a gridview Pin
Johan Hakkesteegt23-Aug-07 3:10
Johan Hakkesteegt23-Aug-07 3:10 
QuestionHelp please to use Enterprise library 3.1 Pin
jesusnaun21-Aug-07 9:36
jesusnaun21-Aug-07 9:36 
AnswerRe: Help please to use Enterprise library 3.1 Pin
Mark Churchill21-Aug-07 18:50
Mark Churchill21-Aug-07 18:50 
GeneralRe: Help please to use Enterprise library 3.1 Pin
jesusnaun22-Aug-07 4:06
jesusnaun22-Aug-07 4:06 
GeneralRe: Help please to use Enterprise library 3.1 Pin
Mark Churchill22-Aug-07 15:03
Mark Churchill22-Aug-07 15:03 
Questionmemorystream Pin
WhiteGirl2321-Aug-07 8:31
WhiteGirl2321-Aug-07 8:31 
AnswerRe: memorystream Pin
Dave Kreskowiak21-Aug-07 8:54
mveDave Kreskowiak21-Aug-07 8:54 
GeneralRe: memorystream Pin
Guffa21-Aug-07 11:13
Guffa21-Aug-07 11:13 
GeneralRe: memorystream Pin
WhiteGirl2321-Aug-07 19:28
WhiteGirl2321-Aug-07 19:28 
AnswerRe: memorystream Pin
Guffa22-Aug-07 4:57
Guffa22-Aug-07 4:57 
GeneralRe: memorystream Pin
WhiteGirl2322-Aug-07 9:01
WhiteGirl2322-Aug-07 9:01 
QuestionFile Association Pin
Kschuler21-Aug-07 7:34
Kschuler21-Aug-07 7:34 
Questionhandshaking through a subdirectory Pin
MartyK200721-Aug-07 6:55
MartyK200721-Aug-07 6:55 

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.