Customization: Looping through a DataSet and populating a Grid

I think I have an example that can help you :)

Private Sub UD03()

'GetRows method
Dim adaUD03Adapter As UD03Adapter = New UD03Adapter(UD01Form)
adaUD03Adapter.BOConnect()
Dim optsUD03 As SearchOptions = New SearchOptions(SearchMode.AutoSearch)
optsUD03.NamedSearch.WhereClauses.Add("Company","ENERGO")
Dim MorePagesUD03 As Boolean
Dim dsUD03Adapter As Data.DataSet = adaUD03Adapter.GetRows(optsUD03, MorePagesUD03)
adaUD03Adapter.Dispose()

'Loop
For each dr as DataRow in dsUD03Adapter.Tables("UD03").Rows
'Whatever you need to do in your loop
Next

'showing the results in udgWynik EpiUltraGrid
ugdWynik.DataSource = dsGrid
ugdWynik.DataMember = "UD03"
ugdWynik.Refresh()
End Sub

*********************
PLEASE USE 'Reply to ALL' functionality - so I don't need to search
through all new posts in Vantage group to be able to answer your
question
*********************

regards

Grzegorz Szczepański

Dnia Thu, 21 May 2009 13:35:16 -0000
"dgodfrey_amc" <dgodfrey_amc@...> napisał(a):

> Does anyone have examples of looping through a DataSet (i.e. the
> return dataset from GetRows method of an adapter).
>
> Also, I am looking for sample code to populate a Grid that I would
> create on a customized sheet.
>
> I appreciate any help that can be given.
>
> Dan
>
Does anyone have examples of looping through a DataSet (i.e. the return dataset from GetRows method of an adapter).

Also, I am looking for sample code to populate a Grid that I would create on a customized sheet.

I appreciate any help that can be given.

Dan