Information générale
Catégorie:
The Mere Mortals .NET Framework
Titre:
Encountering MaxLength error when updating Grid
I'm an MM.NET user, Using C# and ASP.NET. I'm programmatically building grids. I'm using the EditCommandColumn. When I "Edit" a text field of a record by adding characters, and the [Insert] key is off, the record is saved correctly when I "Update"
However, if the [Insert]key was on when I added characters, the string becomes longer than the MaxLength and it sets off the MaxLength constraint when I "Update".
Should I just Trim each text field in the datarow before or within SaveDataSet(), or does anyone have a simpler solution? Of course I could hope that no one ever has the [Insert] key on:)
Tim G
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement