Hi,
I need to disable checkbox when a client selects a particular value fropm a dropdown in the same row as the checkbox.Can you provide me a piece of code to do this.
Thanks & Regards,
Jai
Hi,
I need to disable checkbox when a client selects a particular value fropm a dropdown in the same row as the checkbox.Can you provide me a piece of code to do this.
Thanks & Regards,
Jai
Hi ,
Thanks for the code , actually i was looking for a client side script to disable a cell. there is a dropdown box in one of the cell. and after a particular value say A is selected the row sxhould get disabled,similarly if the usr selects B it the row should get enabled again .So i dont think there is anywhere required to write a server side code.Please letme know how to do this as this is urgent.
Thanks & Regards,
Jairam
Hi Jairam,
We will get back to you soon.
Thank you.
Hi,
You may use the OnCellUpdatedClientFunction client side event to enable or disable the check box.
Here is a sample:
in the Page_Load:
if (!IsPostBack)
{
WebCell cell = sheet.Cells["A1"];
Validation v = cell.CreateValidation(ValidationType.CheckBox, true);
cell = sheet.Cells["B1"];
cell.PutValue("A");
v = cell.CreateValidation(ValidationType.DropDownList, true);
v.ValueList.Add("A");
v.ValueList.Add("B");
GridWeb1.OnCellUpdatedClientFunction = "onUpdate";
}
in the aspx file, add the following script: