Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Displaying Error Icon in GridView
Message
De
15/09/2010 18:35:31
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
 
À
15/09/2010 16:37:50
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01481137
Message ID:
01481385
Vues:
41
>>>>Hi,
>>>>
>>>>I've got an ASP.NET form with an mmGridView showing the many side of a one to many relationship between two tables. When a value in this grid is changed to one that causes a business rule to fail the error icon does not get displayed in the grid. How can I achieve this?
>>>
>>>Am I doing something out of the norm here that no one has encountered this?
>>
>>Hi Frank,
>>
>>I don't think so and I have had others with this challenge. To be honest, editing in a grid can be complicated real easy. I rarely do it only because I don't like dealing with editing in grids. I prefer to provide editing forms. How do you have your in place editing setup? Are you using edit templates?
>>Tim
>
>So you display a separate web page when the user edits each row of the many side of a one to many relationship?.

Not necessarily. Since I am using Telerik, I can use a User Control form within the grid. Check these out.
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx

>
>Yes I am using item and edit item templates in the grid
Then if the save fails are you preventing the edit mode from finishing?
protected void grdStuff_UpdateCommand(object source, GridCommandEventArgs e)
{
     // Get your dataset back and do whatever work you need to do before the save
     //
     // See if the data gets saved and check for broken rules.
     if(this.Save(this.oBizObj, dsMyData)  ==  mmSaveDataResult.RulesBroken)
     {
           e.Canceled = true;
           e.Item.Edit = true;
     }
     //  Reset the edited item and rebind
     this.grdStuff.ItemIndex = -1;
}
Timothy Bryan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform