I'm trying to use an ObjectDataSource bound to a RadGrid to perform automatic Select, Insert, Update and Delete. The OnSelecting method of the ODS refers to a method that is a member of MyClass, and returns a List<MyClass>. The OnUpdating method is also a member of that class and is annotated with [DataObjectMethod(DataObjectMethodType.Update, true)]
[DataObjectMethod(DataObjectMethodType.Update, true)]
public void updateMyClass(MyClass myClassToUpdate, string UserId)
{
BusinessLayer.updateClass(myClassToUpdate, UserId);
}
The exception I'm getting indicates that the method should list the individual fields of the class. That's not how I'm used to doing this and some of my classes I'll be using have a large number of fields. Is there a setting for RadGrid or something else I'm missing that would allow me to pass the class in directly?
Steve
[DataObjectMethod(DataObjectMethodType.Update, true)]
public void updateMyClass(MyClass myClassToUpdate, string UserId)
{
BusinessLayer.updateClass(myClassToUpdate, UserId);
}
Steve