This is a migrated thread and some comments may be shown as answers.

[Solved] Apply Teleric MVC Combo style on dynamic created selectbox via javascript

0 Answers 10 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Stevo
Top achievements
Rank 1
Stevo asked on 12 Jun 2012, 04:52 PM

I have java script which create select box depend of ajax result.

For example, if result = 2x combo, i create 2x select box via javascript.

if (this.Type == "combo") {
                var result = "<label>" + this.Name + "</label><select onChange='ProChange(this)' name='" + this.ID + "'>";
 
                result += "<option value='0'>Please select</option>";
                for (var i = 0; i < this.Values.length; i++) {
                    var resultId = this.Values[i].ID;
                    var resultName = this.Values[i].Name;
 
                    result += "<option value= " + resultId + ">" + resultName + "</option>";
                }
                result += "<option value='-1'>Other</option>";
                result += "<input type='text' name='"+this.ID+"other' style='display:none;' id='"+this.ID+"' />";
                result += "</select>";

So my main question is, can i apply telerik style on dynamic created select box? 

Can i create "new Telerik Combo" in C# and return html as ajax response?

Tags
General Discussions
Asked by
Stevo
Top achievements
Rank 1
Share this question
or