Hello,
I have a RadGrid that contains a MasterEditTemplate for editing records that is working fine (like the the other 4 RadGrids contained in this template), but for some reason it remains visible after the update.
If I place the grid in edit mode using the custom <CommandTemplate> and then click the cancel link the template closes as it should. Yet i when I place the grid in edit mode (clicking the AutoGeneratedEdit column icon) and update the database the template remains visible. I can confirm that the "UpdateSponsoredLinkSponsor()" call returns true and is assigned to the e.Cancelled member of the GridCommandEventArgs parameter to the event. In every other case on the web template this closes the MasterEditTemplate but not in this one.
| protected void grdSponsoredLinkSponsor_ItemCommand(object source, GridCommandEventArgs e) |
| { |
| Controller controller = GlobalMethods.GetController(); |
| switch ( e.Item.OwnerTableView.Name ) |
| { |
| case "SponsoredLinkSponsor": |
| { |
| switch ( e.CommandName ) |
| { |
| case RadGrid.InitInsertCommandName: |
| { |
| .. |
| } |
| case RadGrid.PerformInsertCommandName: |
| { |
| .. |
| } |
| case RadGrid.EditCommandName: |
| { |
| .. |
| } |
| case RadGrid.UpdateCommandName: |
| { |
| Guid primaryKey = (Guid) e.Item.OwnerTableView.DataKeyValues[0]["PrimaryKey"]; |
| SponsoredLinkSponsor activeSponsoredLinkSponsor = (SponsoredLinkSponsor) controller.DataCache.GetObject(primaryKey); |
| e.Canceled = !UpdateSponsoredLinkSponsor(activeSponsoredLinkSponsor); |
| if ( e.Canceled == false ) |
| { |
| ... |
| grdSponsoredLinkSponsor.Rebind(); |
| } |
| break; |
| } |
| break; |
| } |
| } |
I have placed a copy of the .aspx and .cs files on my server in a public folder here:
Can anyone tell me what might be going on here? Again the update method returns true.
Thanks