I am new to Asp 2.0 and I am trying to work with the new Object DataSource.
All the examples I have found Update and Insert records directly back to a database. What I am looking for the GridView to be disconnect from the data until all changes are made, using the new features of Asp2.0
I tried to hookup the DataSource alone by
CustomerController cc = new CustomerController();
GridView1.DataSource = cc.GetCustomer();
GridView1.DataBind();
But by doing this I have to hookup the Updates and Delete commands of GridView, and possibly create Item Templates, like in Asp1.0
I have been playing with the Object DataSource, and that is nice because it would hook up those events, but I am having trouble writing the Select, Update, Delete members
What I would like is?
SelectCustomer()
{
//If data already grabbed from database, give back current state of data
//If not init data from Database
}
Update()
{
//Set bit for the current object in the current collection to true
// customer.Updated = true;
}
Delete()
{
//Set bit for the current object in the current collection to true
// customer.Delete = true;
}
The problem I keep running into is how do I get to the collection, that is stored in the GridView DataSource?
I hope this made sence, if not I can try and re-explain
All the examples I have found Update and Insert records directly back to a database. What I am looking for the GridView to be disconnect from the data until all changes are made, using the new features of Asp2.0
I tried to hookup the DataSource alone by
CustomerController cc = new CustomerController();
GridView1.DataSource = cc.GetCustomer();
GridView1.DataBind();
But by doing this I have to hookup the Updates and Delete commands of GridView, and possibly create Item Templates, like in Asp1.0
I have been playing with the Object DataSource, and that is nice because it would hook up those events, but I am having trouble writing the Select, Update, Delete members
What I would like is?
SelectCustomer()
{
//If data already grabbed from database, give back current state of data
//If not init data from Database
}
Update()
{
//Set bit for the current object in the current collection to true
// customer.Updated = true;
}
Delete()
{
//Set bit for the current object in the current collection to true
// customer.Delete = true;
}
The problem I keep running into is how do I get to the collection, that is stored in the GridView DataSource?
I hope this made sence, if not I can try and re-explain