Jul 25, 2006 #1 Erics44 Programmer Oct 7, 2004 133 GB hi I am getting an error with the following code, it is saying I havent set the last line as an instance of an object. Can anyone tell me why please Dim dr As DataRow Dim dt As DataTable dt = dgActivities.DataSource For Each dr In dt.Rows Thanks in advance
hi I am getting an error with the following code, it is saying I havent set the last line as an instance of an object. Can anyone tell me why please Dim dr As DataRow Dim dt As DataTable dt = dgActivities.DataSource For Each dr In dt.Rows Thanks in advance
Jul 25, 2006 #2 jbenson001 Programmer Jan 7, 2004 8,172 US What is the datasource of the grid? Is it a dataset or datatable? Upvote 0 Downvote
Jul 25, 2006 Thread starter #3 Erics44 Programmer Oct 7, 2004 133 GB it was from a datatable Upvote 0 Downvote
Jul 25, 2006 #4 chrissie1 Programmer Aug 12, 2002 4,517 BE you probably need something like this dt = ctype(dgActivities.DataSource,datatable) Christiaan Baes Belgium "My new site" - Me Upvote 0 Downvote
you probably need something like this dt = ctype(dgActivities.DataSource,datatable) Christiaan Baes Belgium "My new site" - Me