This is a migrated thread and some comments may be shown as answers.

Client-side disable of a grid

2 Answers 71 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
SultanOfSuede
Top achievements
Rank 1
SultanOfSuede asked on 13 Nov 2008, 08:00 PM
Is there any way to disable a grid from the client-side, using JavaScript?

if not, is there a way to force a grid to refresh from the client?

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 14 Nov 2008, 08:18 AM
Hi SuitanOfSuede,

For disabling RadGrid completely at the client side, you need to disable the active links/images/inputs/spans/etc which is inside the grid manually. So you have to add codes additional to "gridCtrl.get_element().disabled = "disabled" in order to achieve that. Please check the below link for more information, which will help you to disable RadGrid from Client side.

Enabled/Disabled conventions

Thanks,
Shinu.
0
SultanOfSuede
Top achievements
Rank 1
answered on 14 Nov 2008, 08:32 PM
Yeah, I went down that path of letting the server side disable/enable the grid using an Ajax request, but it doesn't work.  The grid is not refreshed on the client after the call (it will appear disabled however if you do something like add a new record when the server thinks it's disabled).  The code in the link you forwarded has the same problem -- calling Rebind() after disabling/enable controls doesn't do anything.

The client side-only code has the same problem -- it still executes an Ajax request in the Enable() method and the grid is still not refreshed.
Tags
Ajax
Asked by
SultanOfSuede
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
SultanOfSuede
Top achievements
Rank 1
Share this question
or