I have a check box, drop down list and required field validtor in RadGrid. I want to enable disable required filed validator for the drop down upon check box selection. Now the below Java script code does enable and disable the required filed validator on edit mode.
But when I click rad grid edit mode update button (check box is un-checked and drop down box selected value also empty ("") it waits little while (probably doing a post back) and fire the required field validator again.
Any idea why it behaving like that. Help appreciate.
I got the control access part from below link. Accessing Telerik RadGrid edit mode from javascript
my Rad grid markup:
<EditItemTemplate>
<asp:CheckBox ID="chkConfigurable" runat="server" Checked='<%# Bind("Configurable") %>'
</EditItemTemplate>
This is my java script code:
// Enbable or disable the required field validator depend on check box selection
function EnableDisbaleConfigRfv(chkbx) {
var grid = $find("<%=rgItems.ClientID %>");
var masterTable = grid.get_masterTableView();
// get the required field validator id from grid
var rfv = $telerik.$(masterTable.get_element()).find('[id*="rfvddlConfigTeam"]')[0];
// enable disable validator
if (chkbx) {
ValidatorEnable(rfv, true);
ValidatorUpdateDisplay(rfv); // this one added after reading some posts but no luck.
} else {
ValidatorEnable(rfv, false);
}
}