B
Bogdan
Hi,
I have a DataSourceObject with update method as follows:
Update(ID, field1, field2).
ID represents a value of a primary key in a table. The field is set to
Readonly in the GridView. I use stored procedure to update a row in the
table. The procedure takes ID, field1, and field2 as parameters (ID is
needed to identify the row).
The GridView does not seem to pass the ID to my DataSourceObject's Update
method. Instead it tries to locate a method with a different signature
which is Update(field1, field2). This just does not make any sense: without
ID I cannot update the corresponding row. And of course, I can't make the
ID to be editable in the GridView.
All this is a bit confusing because I defined an Update method with correct
signature, associated the object data source with the grid view (and
implicitly instructed the grid view to use the Update method, I thought) and
still, the grid view does its own thing and looks for a method with a
different signature.
Could someone please give me some ideas on how to tackle this problem? I'm
quite new to asp.net and I'm sure that there is a proper (although not
obvious) way of handling it
Thanks,
Bogdan
I have a DataSourceObject with update method as follows:
Update(ID, field1, field2).
ID represents a value of a primary key in a table. The field is set to
Readonly in the GridView. I use stored procedure to update a row in the
table. The procedure takes ID, field1, and field2 as parameters (ID is
needed to identify the row).
The GridView does not seem to pass the ID to my DataSourceObject's Update
method. Instead it tries to locate a method with a different signature
which is Update(field1, field2). This just does not make any sense: without
ID I cannot update the corresponding row. And of course, I can't make the
ID to be editable in the GridView.
All this is a bit confusing because I defined an Update method with correct
signature, associated the object data source with the grid view (and
implicitly instructed the grid view to use the Update method, I thought) and
still, the grid view does its own thing and looks for a method with a
different signature.
Could someone please give me some ideas on how to tackle this problem? I'm
quite new to asp.net and I'm sure that there is a proper (although not
obvious) way of handling it
Thanks,
Bogdan