I have a grid that has an ObjectDataSource. I don't assign the DataSourceID Declaratively.
As soon as I set the Datasource in my code (from a button event), it binds at that point and the ObjectCreated event fires.
But I don't have to do a DataBind().
If I do:
or
Either way, it binds/fires.
Does it happen just by setting the DataSourceID?
If I wanted it to fire again, would I just have to reassign the DataSourceID to get it to fire?
Thanks,
Tom
As soon as I set the Datasource in my code (from a button event), it binds at that point and the ObjectCreated event fires.
But I don't have to do a DataBind().
If I do:
Code:
this.mGridView.DataSourceID = mObjectDataSource2.ID;
mGridView.DataBind();
or
Code:
this.mGridView.DataSourceID = mObjectDataSource2.ID;
//mGridView.DataBind();
Either way, it binds/fires.
Does it happen just by setting the DataSourceID?
If I wanted it to fire again, would I just have to reassign the DataSourceID to get it to fire?
Thanks,
Tom