Click here to Skip to main content
15,901,505 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hii.

In my project, in the main page, I've a ASPxPageControl and ASPxPopupControl. In the ASPxPopUpControl, I've a form consits of two radio buttons and so many text fields and combo boxes etc. In the ASPxPageControl, there are two tabs.

The PopUpElement of ASPxPopupControl is in the second tab. And on the PageLoad(), I've configured to display the first tab.

I want to enable/disable texbox in the form according to the user selection of the radio button. But, when AutoPostBack is enabled, the entire page is refreshed, and the default tab will be the first one. And to resume the form, i've to manually click the second tab and the ASPxPopupControl will open automatically.

Is there anyway to resolve this?? Is there any other control other than radio button to do this?(Which accepts client side scripting)
Posted
Comments
Monjurul Habib 3-Jun-11 16:00pm    
please share your code to help you more accurately.

1 solution

Use javascript to enable/disable the textbox manually.

Your radiobuttons each have a javascript event that can be handled called onChange




Then your javascript function will look like:


var enableText = false;
function setTextBox(enableText){
    //thus far we're not using jQuery, but jQuery makes this easier
    var txtBox = document.getElementById(<%= txtBoxControl.ClientId %>);
    txtBox.disabled = enableText;
}



Enjoy.
 
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