G
Guest
I've discovered something odd (it seems) with using Typed Datasets to bind to
an Infragistics WebGrid I have on my ASP.NET (2.0) webform.
Essentially, if I set up a Typed Dataset (using Stored Procedures for all
data access, including select, update, insert, and delete), and then create
the WebGrid, bind to a DataSource that's bound to the Typed Dataset, I've
found that while I can see the data (meaning the Select is working), and I
can do Inserts and Deletes, the Update simply doesn't work.
I've found that when I do the update, it does hit the .Updating event on the
DataSource (found by putting a breakpoint in the code there), but it never
hits the .Update method on the Dataset itself. I also confirmed (via SQL
profiler) that the UPDATE stored procecure is never even called.
To make sure it wasn't a problem with breakpoints in the Dataset, I was able
to hit breakpoints on the .Insert method.
It also never hits the .Updated method on the DataSource either.
For now, I've worked around it, by simply instantiating an instance of the
DataSetTableAdapters object, and calling the .Update method from the
..Updating event on the DataSource.
But I shouldn't have to do that.
Has anyone else had similar problems like this, and if so, is there a
solution?
Thanks!
P.S. To make sure it wasn't a problem with my main (complex) application, I
was able to create a bare-bones test application, referencing a dummy
database (with one table and 4 stored procedures), and I was able to recreate
this every time.
an Infragistics WebGrid I have on my ASP.NET (2.0) webform.
Essentially, if I set up a Typed Dataset (using Stored Procedures for all
data access, including select, update, insert, and delete), and then create
the WebGrid, bind to a DataSource that's bound to the Typed Dataset, I've
found that while I can see the data (meaning the Select is working), and I
can do Inserts and Deletes, the Update simply doesn't work.
I've found that when I do the update, it does hit the .Updating event on the
DataSource (found by putting a breakpoint in the code there), but it never
hits the .Update method on the Dataset itself. I also confirmed (via SQL
profiler) that the UPDATE stored procecure is never even called.
To make sure it wasn't a problem with breakpoints in the Dataset, I was able
to hit breakpoints on the .Insert method.
It also never hits the .Updated method on the DataSource either.
For now, I've worked around it, by simply instantiating an instance of the
DataSetTableAdapters object, and calling the .Update method from the
..Updating event on the DataSource.
But I shouldn't have to do that.
Has anyone else had similar problems like this, and if so, is there a
solution?
Thanks!
P.S. To make sure it wasn't a problem with my main (complex) application, I
was able to create a bare-bones test application, referencing a dummy
database (with one table and 4 stored procedures), and I was able to recreate
this every time.