Link to home
Start Free TrialLog in
Avatar of RyanBank
RyanBank

asked on

Type 'DataSet' is not defined.

Hi,

I have a aspx and ascx when I run the aspx file it generates the following error:



Server Error in '/' Application.
--------------------------------------------------------------------------------
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30002: Type 'DataSet' is not defined.
Source Error:
Line 3:      Sub Page_Load(ByVal Sender As Object, ByVal E As EventArgs)
Line 4:          Dim dgi As DataGridItem = CType(Me.BindingContainer, DataGridItem)
Line 5:          Dim ds As DataSet = CType(dgi.DataItem, DataSet)
Line 6:          If (Not (TypeOf dgi.DataItem Is DataSet)) Then
Line 7:              Throw New ArgumentException("Please change the TemplateDataMode attribute to 'Table' in the HierarGrid declaration")
Source File: c:\inetpub\wwwroot\Template\Sup.ascx    Line: 5

SOLUTION
Avatar of SystemExpert
SystemExpert
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RyanBank
RyanBank

ASKER

SimonBlake,

Work like a charm!

Thanks
n/p easily done