Can someone tell me how to disable/enable a button that was created inside a GridTemplateColumn in the client-side OnRowSelected/OnRowDeselected events.
Basically when a row is selected, I want its button to be enabled and all other rows buttons to be disabled.
I was able to figure out how using the article you linked me to, but now I have run into another problem. If the asp button in the TemplateColumn in my RadGrid is disabled at the start, the ItemCommand event fails to fire for the button click. How can I fix this? I need the button to start disabled, then when the row is clicked the button is enabled, and then when the button is clicked the ItemCommand event fires for the grid.
This seems to be a limitation of the button itself, when dealing with the disabled/enabled status.
One possible approach would be to re-enable it from the server - making a postback/callback once you click on the row.
Another option is to assign a css class to the button, from the server, which would resemble a disabled style. Then, from the client, you can alter this css class.
Additionally, for as long as a button has the "disabled" class assigned, you can cancel out its click event(s). thus simulating the same behavior.
I hope these suggestions help.
Regards,
Yavor
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.