Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Infragistics WebGrid Updating
Message
De
25/08/2005 20:18:42
John Darragh
Entrotech Engineering, Inc.
Torrance, Californie, États-Unis
 
 
À
30/07/2005 13:43:25
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
ASP.NET
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
01030174
Message ID:
01044165
Vues:
21
I tried upgrading to MM 1.4.1 and Infragistics 2005 vol 2, but this didn't help.

The MM sample code for Batch updating is a slight modification of the instructions from the Infragistics Manual under ASP.NET / WEbGrid / Tutorials / In-Depth / Update Database In Batch Mode. If you step through that example, you will find that it fails in exactly the same two places.

As you mentioned, the line

e.Row.Cells.FromKey("GUID").Value = dr("GUID")

in method grdRegion_AddRowBatch fails if you try to insert a new row.

If you trace the problem, you find that Key indexes are missing from the Cells collection, so the FromKey("GUID") comes up empty when it tries to locate the column.

Note that when the GUID column is added, it is added to the Columns collection in Band(0), and it's not at all clear how this collection might be related to the e.Row.Cells collection in the AddRowBatch handler - Apparently the indexes are not the same. In fact, you will find that e.row.cells.count indicates that there are three columns, but all of their indexes are "Nothing".

I also found that if you try to update a cell and save the changes, the code in grdRegion_UpdateCellBatch fails on the line

dr(e.Cell.Column.Key) = e.Cell.Value

In this case e.Cell.Column is nothing - apparently you cannot determine which column was changed. This appears to be a show-stopper, unless there is some other way to determine exactly which column the new value belongs to - but I haven't been able to find a way to get this information.

Maybe there's just a property of the Infragistics UltraWebGrid (or MM equivalent) that isn't mentioned in the sample that needs to be set to some specific value, but with the hundreds of properties on the grid, I haven't been able to find anything that seems relevant.

I've had much better luck trying with an example from the Infragistics Samples Explorer Under WebGrid / Database Updating. It's so much easier starting with a working sample. Now I need to figure out how to transalte this sample to work with the MM sub-class of the grid.
John Darragh
Entrotech Engineering, Inc.
darragh@entrotech.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform