I have a small bit of validation that when fails cancels an update. When this happens, the fields that i want to stay in edit mode do so but one column that is explicity set to readonly becomes editable also. Is there any reason for this?
Anyone? This e.cancel is causing some funny behaviours in both insert and update. On update, when validation fails and e,cancel is executed one of my read only columns (Griddropdowncolumn) holds no values after the e.cancel i.e. the grid stays in edit mode. I populate my read only (at runtime) drop down column on the item databaound like so:
The column only becomes editible in insert mode, when the original problem i discussed above is encountered. When e.cancel is run it seems to do nothing afterwards i.e. hit any of my itemcommand, itemdatabound etc. code. Any help would be greatly appreciated.
Is there anyone from Telerik who can assist me on this? It is holding me back and i would appreciate assistance.
0
Tsvetina
Telerik team
answered on 16 Nov 2011, 09:25 AM
Hi Michael,
It is expected that e.Canceled would not call any command after being called. As in other cancellable events, it only cancels the default operation. If you want to have a rebind or fire another command, you should do it manually.
Also, if you are manually making the column readonly in ItemDataBound, move your logic to ItemCreated, as it runs on each postback (while ItemDataBound runs only when the grid is rebound).
If none of these helps, paste your code related to this issue and we will test it locally.
Greetings,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now