Hi All!
I have the following problem:
I wrote a Generic class called Demo. It has three properties (get, set) and has LoadAll and Update functions from/into database.
List<Demo> demo = IDemoFactory.LoadAll(); //gives all the items from a table.
In RadGrid NeedDataSource event:
radGridDemo.DataSource = demo;
and now what I need to know how can I do:
I change the properties of the selected (edited) object and run Update Command -> radGridDemo_UpdateCommand(object source, GridCommandEventArgs e) fired. and I need my edited Custom Demo object somehow in the following way.
Demo demo = e.Item.DataItem as Demo;
IDemoFactory.Update(demo);
Is it possible to do on the way mentioned above or I need to set the edited properties on a Demo type object and than i need to give it to my Update function?
I have 40 properties and hard to do...
I have the same question about InsertCommand.
I hope U understand my question.
thanks,
g.
I have the following problem:
I wrote a Generic class called Demo. It has three properties (get, set) and has LoadAll and Update functions from/into database.
List<Demo> demo = IDemoFactory.LoadAll(); //gives all the items from a table.
In RadGrid NeedDataSource event:
radGridDemo.DataSource = demo;
and now what I need to know how can I do:
I change the properties of the selected (edited) object and run Update Command -> radGridDemo_UpdateCommand(object source, GridCommandEventArgs e) fired. and I need my edited Custom Demo object somehow in the following way.
Demo demo = e.Item.DataItem as Demo;
IDemoFactory.Update(demo);
Is it possible to do on the way mentioned above or I need to set the edited properties on a Demo type object and than i need to give it to my Update function?
I have 40 properties and hard to do...
I have the same question about InsertCommand.
I hope U understand my question.
thanks,
g.