Hi there,
I would like to be able to query if a dataItem or a row is in EditMode on the client-side in JavaScript on the RadGrid (using the Q1 2008 Ajax RadControls.)
I want to know this because I want to be able to set an item into EditMode if a user clicks on the row. At the moment I am solving this by putting the following code into the "ClientEvents-OnRowClick" event:
var dataItem = $get(args.get_id());
var anchorHref = dataItem.getElementsByTagName("a")[0].href;
if (anchorHref.indexOf("EditButton") > 0)
eval(anchorHref);
However, this seems like a real hack to me and is dependant on there being an Edit anchor element when not in editmode. Also I doubt this will work once I've "Ajaxified" my grid?
Thanks in advance,
- Nick
I would like to be able to query if a dataItem or a row is in EditMode on the client-side in JavaScript on the RadGrid (using the Q1 2008 Ajax RadControls.)
I want to know this because I want to be able to set an item into EditMode if a user clicks on the row. At the moment I am solving this by putting the following code into the "ClientEvents-OnRowClick" event:
var dataItem = $get(args.get_id());
var anchorHref = dataItem.getElementsByTagName("a")[0].href;
if (anchorHref.indexOf("EditButton") > 0)
eval(anchorHref);
However, this seems like a real hack to me and is dependant on there being an Edit anchor element when not in editmode. Also I doubt this will work once I've "Ajaxified" my grid?
Thanks in advance,
- Nick