Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi All,
I have a grid, inside grid i have CheckboxList for each row with some listitems. Outside of grid i have another checkbox, basing on outside checkbox selection i am enabling and disabling rows in gridview using Javascript. All controls inside gridview (like textbox, dropdownlist) are working properly except CheckboxList.

I debugged and saw innerHTML for gridview CheckboxList i observed for each Listitem(span tag) having disabled properly. How i can resolve this issue.

My javascript code as on clicking of outside checkboxlist i am doing inside grid elements as "enable" and "disable"

ex. txtName.disable = false; txtName.disable = true;
chkCourses.disable = false; chkCourses.disable = true;// this is not working
ddlCollege.disable = false; ddlCollege.disable = true;

Please help me.
Posted
Comments
Sergey Alexandrovich Kryukov 27-Aug-15 10:47am    
You are not showing relevant code. In what language is you code sample? Where is the definition of chkCources and .disable? JavaScript element object does not have such property. And so on...
—SA

1 solution

Please see my comment to the question. Nobody can see what you are really trying to do. It does not seem to make any sense.

But let's assume for a minute that you really have chkCources properly defined and initialized, and the property disable really exists and does what it should do. I doubt it, but let's assume it. Even then, look at your line
JavaScript
chkCourses.disable = false; chkCourses.disable = true;

How could it possibly work? If it was enabled, it will state enabled; if it was disables, first statement does nothing.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900