Asp.net Forum

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds


  Asked By: Carlton    Date: Mar 29    Category: Asp.net    Views: 1411

I have a stored proc that returns 12 results sets and fills a ds, so I will
have a dataset with 0 to 11 datatables.

I then have 12 data grids.

Can one make the DS public so that I can ref to the ds.tab.... to bind to
each Datagrid.

For example:

Public DS as New Dataset

'Fill the dataset

Pseudo code

then in


'.all the lovely other code

Dgjan.datasource = Ds.table(0)

End sub


'.all the lovely other code

DgFeb.datasource = Ds.table(0)

End sub

Or is there a better way...



2 Answers Found

Answer #1    Answered By: Bach-yen Nguyen     Answered On: Mar 29

isn't this one answered by using properties ?

private DS;

public DataSet DSet
return DS;
DS = DSet;

Then, from outside the current page, you can get to DS.Tables via DSet.Tables

I've always wondered and toyed with (but haven't tried) using Properties to
return controls, maybe an alternative to FindControl()

Answer #2    Answered By: Lurline Fischer     Answered On: Mar 29

I have the following set up on my web form:
datagrid control

I can import the data  From the sql tables and see it clearly on the "dbo." tab
in the IDE.
How can I fill the dataset?
I have tried various things but I can't get the grid and/or the information to
apear when I view it in the browser.

Didn't find what you were looking for? Find more on Dataset Or get search suggestion and latest updates.