I am converting some traditional combo boxes to RadCombo boxes on a page. Each of the combo boxes is in a user control that is dynamically added to the page at runtime.
In the code behind, I am building some client side javascript that will call a custom ajax web service to do some calculations and such.
For example:
But now I need to change this to use the RadCombo boxes.
How do I change this:
cmbExistFixture.Attributes.Add("onChange", javaScript.ToString());
to the equivilent in the RadCombo? Since the javascript that is being executed is dynamically generated, and each one is unique, I can't set this in the markup with OnClientSelectedIndexChanged.
Can I set "OnClientSelectedIndexChanged to some javascript (like above) rather than a named function?
Greg
In the code behind, I am building some client side javascript that will call a custom ajax web service to do some calculations and such.
For example:
StringBuilder javaScript = new StringBuilder(); |
javaScript.Append("saveLuminaireInvestment("); |
javaScript.Append("$get('" + this.lblLuminaireID.ClientID + "').innerHTML, "); |
javaScript.Append("$find('" + this.cmbExistFixture.ClientID + "').value, "); |
javaScript.Append("$find('" + this.cmbTCPFixture.ClientID + "').value, "); |
javaScript.Append("$get('" + this.txtQuantity.ClientID + "').value, "); |
javaScript.Append("$get('" + this.txtTCPQuantity.ClientID + "').value, "); |
javaScript.Append("$get('" + this.txtTCPCostPerFixture.ClientID + "').value, "); |
javaScript.Append("$get('" + this.txtTCPInstallCost.ClientID + "').value, "); |
javaScript.Append("$get('" + this.txtTCPRebate.ClientID + "').value"); |
javaScript.Append("); "); |
cmbExistFixture.Attributes.Add("onChange", javaScript.ToString()); |
But now I need to change this to use the RadCombo boxes.
How do I change this:
cmbExistFixture.Attributes.Add("onChange", javaScript.ToString());
to the equivilent in the RadCombo? Since the javascript that is being executed is dynamically generated, and each one is unique, I can't set this in the markup with OnClientSelectedIndexChanged.
Can I set "OnClientSelectedIndexChanged to some javascript (like above) rather than a named function?
Greg