Hi, I want to work with some data with an ObjectDataSource. The data comes from a DB table which have two fields: ID (primary key) and Title. I have created such a class: [System.ComponentModel.ObjectData(true)] class Biz { public Biz() {} [System.ComponentModel.ObjectMethod(Select)] public DataSet FetchAll() { ... } [System.ComponentModel.ObjectMethod(Update)] public void Update(int Serial, string Title) {...} } I have assigned this class to my ObjectDatasource. And I show the records with a Gridview control. Since ID field is PK it must not be update. so I make Id field Invisible or Readonly. Then when updating the records, only Title field is edditable. Afterwards, in Update method, Serial parameter is always 0 (becasue Id was not editted) and only Title field has a correct value. I need Serial field's value to update the Table because more than one person may have the same name. I have written a code in GridView's RowUpdating event and bypassed the Biz.Update method but I am quite sure it is a wrong job. Please let me know what to do to make the ObjectDataSource update records by itself. Thanks
Aref