I have a webdatagrid on the page which has selection, paging, sorting behaviors enabled. I want to be able to disable the grid (and the above behaviors) when a check box is clicked on the page on ClientSide.I tried to use the grid._enabled=false; But that did not work.
Can someone please advise? Thanks!
This is not really possible. If you use an ASP checkbox with autopostback, you could do change it there. If you really want it on the client, you'd sort of have to hack it. You'd have to check to see what css styles are applied to the grid and probably apply them when your checkbox becomes checked. In order to stop behaviors from happening, you'd need to handle all the start client events and cancel them. These are mostly -ing events. Hopefully this will get you the behavior you desire.
I would imagine if you put the grid and checkbox (autopostback) into an update panel, you would get pretty good performance from that, especially if you don't need the grid to look disabled, you could disable all the behaviors server side and you wouldn't need much of a browser update.
Hi, Thanks for the quick reply. My objective was just to dis-allow user activity in the grid. I am approaching in the following manner for now. Thought this may be useful for someone else...I am loading a <div> tag with opacity: 50% over the grid to make it appear disabled when the checkbox is selected. When the checkbox is de-selected, I am hiding the <div> tag. This is good enough for my need.
Thank you all for the prompt response.