O
OJ
Hi,
I have a WebUserCOntrol with a GridView and I am attempting to set the
DataSource of the Gridview in the User control from the parent ASPX
page. I have the following property in the user control...
public DataTable DataSourceTable
{
get
{
return this.gvwMain.DataSource as DataTable;
}
set
{
this.gvwMain.DataSource = value;
}
}
Where gvwMain is the name of the gridview. However, when I try to set
the datasource I get a NullReferenceException saying that gvwMain (the
gridview) is Null....what am I missing then? In 2.0 using VWD2005...
Thanks,
Oli
I have a WebUserCOntrol with a GridView and I am attempting to set the
DataSource of the Gridview in the User control from the parent ASPX
page. I have the following property in the user control...
public DataTable DataSourceTable
{
get
{
return this.gvwMain.DataSource as DataTable;
}
set
{
this.gvwMain.DataSource = value;
}
}
Where gvwMain is the name of the gridview. However, when I try to set
the datasource I get a NullReferenceException saying that gvwMain (the
gridview) is Null....what am I missing then? In 2.0 using VWD2005...
Thanks,
Oli