'how to enable or disable grid view rows based on drop down list selected index changed event
I am having a grid view with checkbox for selection,a dropdownlist for accepting or declining, other 3 dropdown which populates values from SQL server where one dropdownlist populates values and based on that other dropdown is loaded(like country, state) and also 2 textboxes and 5 bound fields. now when selected index changed of dropdown is fired other dropdown is populated but the specific rows of grid view which have to be disabled based on action(accept/decline) is getting automatically enabled. tried to use update panel and able to avoid complete refresh of the page but still the rows which should be disabled are getting enabled. so please let me know what can be done so that after dropdown index changed event is fired specific rows of the grid view should be enabled or disabled based on value specified in action(accept/decline) dropdown.
Tried to use update panel to avoid page refresh. also tried to call the grid rows in row data bound event but got 'object reference not set to instance of an object error' also tried to setup a javascript function which will enable or disable rows in aspx page and tried to call it in code behind using ScriptManager.RegisterClientScriptBlock but the function is not making any change.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
