Click here to Skip to main content
15,903,201 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionRedundancy seems to be my game to avoid Null Reference and Index Out of Range Exceptions - HELP! Pin
Marcus J. Smith14-Feb-07 2:16
professionalMarcus J. Smith14-Feb-07 2:16 
AnswerRe: Redundancy seems to be my game to avoid Null Reference and Index Out of Range Exceptions - HELP! Pin
Colin Angus Mackay14-Feb-07 5:02
Colin Angus Mackay14-Feb-07 5:02 
Questionhelp for MenuItem for VB.Net Compact Framework Pin
danaelx14-Feb-07 0:37
danaelx14-Feb-07 0:37 
Questionwhat is handle in .net Pin
saravanaks13-Feb-07 23:59
saravanaks13-Feb-07 23:59 
AnswerRe: what is handle in .net Pin
Christian Graus14-Feb-07 0:35
protectorChristian Graus14-Feb-07 0:35 
AnswerRe: what is handle in .net Pin
Thomas Stockwell15-Feb-07 14:26
professionalThomas Stockwell15-Feb-07 14:26 
Questionhow could I use the values of the dataGrid Pin
costavo13-Feb-07 23:52
costavo13-Feb-07 23:52 
AnswerRe: how could I use the values of the dataGrid Pin
Marcus J. Smith14-Feb-07 2:09
professionalMarcus J. Smith14-Feb-07 2:09 
There are really 2 choices here. You can grab the values out the datagrid, which means you would probably want to use the OnItemDataBound event and calculate the hours for each row as it is added or you can look at the datasource you are providing and get the values from there.

For the OnItemDatabound event you can do a case statement like this (this is from memory so forgive me if it isnt exactly correct) -
Select Case e.Item.Type<br />
Case Item<br />
'Calculate from cell contents and get a TimeSpan object<br />
ts = Convert.ToDateTime(e.Item.Cells(#).Text).Subtract(Convert.ToDateTime(e.item.Cells(#).Text)<br />
<br />
txtTotalHours = ts.TotalHours<br />
End Select<br />


Something along those lines, I hope that helps!

Cleako
AnswerRe: how could I use the values of the dataGrid Pin
Rahul Appu14-Feb-07 2:12
Rahul Appu14-Feb-07 2:12 
GeneralRe: how could I use the values of the dataGrid Pin
costavo14-Feb-07 2:19
costavo14-Feb-07 2:19 
QuestionRe: how could I use the values of the dataGrid Pin
costavo14-Feb-07 2:32
costavo14-Feb-07 2:32 
AnswerRe: how could I use the values of the dataGrid Pin
Marcus J. Smith14-Feb-07 2:52
professionalMarcus J. Smith14-Feb-07 2:52 
QuestionOpen Directory Pin
lone_wolf35113-Feb-07 23:34
lone_wolf35113-Feb-07 23:34 
AnswerRe: Open Directory Pin
Christian Graus14-Feb-07 0:39
protectorChristian Graus14-Feb-07 0:39 
GeneralRe: Open Directory Pin
lone_wolf35114-Feb-07 0:45
lone_wolf35114-Feb-07 0:45 
AnswerRe: Open Directory Pin
WestSideRailways14-Feb-07 7:33
WestSideRailways14-Feb-07 7:33 
GeneralRe: Open Directory Pin
Dave Kreskowiak14-Feb-07 16:14
mveDave Kreskowiak14-Feb-07 16:14 
GeneralRe: Open Directory Pin
WestSideRailways14-Feb-07 21:45
WestSideRailways14-Feb-07 21:45 
GeneralRe: Open Directory Pin
Dave Kreskowiak15-Feb-07 4:25
mveDave Kreskowiak15-Feb-07 4:25 
Questionoption explicit problem? Pin
.NetRams13-Feb-07 23:27
.NetRams13-Feb-07 23:27 
AnswerRe: option explicit problem? Pin
Christian Graus14-Feb-07 0:45
protectorChristian Graus14-Feb-07 0:45 
GeneralRe: option explicit problem? Pin
.NetRams14-Feb-07 1:45
.NetRams14-Feb-07 1:45 
QuestionProgress Bar (Download) [modified] Pin
Injektio13-Feb-07 23:12
Injektio13-Feb-07 23:12 
AnswerRe: Progress Bar (Download) Pin
Dave Kreskowiak14-Feb-07 16:12
mveDave Kreskowiak14-Feb-07 16:12 
AnswerRe: Progress Bar (Download) Pin
haggenx16-Feb-07 8:29
haggenx16-Feb-07 8:29 

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.