Hello.
Using same initialization mode used for JquieryUi I will replace existing DOM items generated by a asp.net application. The items are identifiled by a specific css class. Iterating on we will replace existing <asp:DropDownList with a webix.ui.
I don’t have find a webix costructor that replace. Below the portion of script and asp.
function log(message) {
$("<div>").text(message).prependTo("#log");
$("#log").scrollTop(0);
}
$(document).ready(function () {
alert("DOM START CHILD $(document).ready");
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(setAutocompleteJsonWebix);
setAutocompleteJsonWebix();
alert("DOM END_ CHILD $(document).ready");
});
function setAutocompleteJsonWebix() {
$("select.WebixComboboxJson").each(function () {
log("DOM Start select.WebixComboboxJson");
var id = this.id;
var tooltip = $(this).attr('title');
log("DOM id=" + id + " tooltip=" + tooltip);
var HidId = "#" + id + "Value";
if ($(HidId).length === 0) {
alert("WebixComboboxJson for Value combobox=" + id + " NOT FOUND input hidden=" + HidId);
return;
}
// We will/need to replace the DOM item this with the webix.ui
webix.ui({
view: "combo",
label: 'Combo',
value: "One",
options: ["One", "Two", "Three"]
});
log("DOM DONE select.WebixComboboxJson id=" + id);
});
}
…
<p>
<label for="DDListFilialiJson">Select an Item Json : </label>
<asp:DropDownList ID="DDListFilialiJson" runat="server" CssClass="WebixComboboxJson"
ToolTip="WebService.asmx/getSrfsJson">
</asp:DropDownList>
<asp:Button ID="DDListFilialiJsonSubmit" runat="server" Text="<>" />
</p>
JSon/Error result:
<div id="log" style="height: 200px; width: 500px; overflow: auto;" class="ui-widget-content"></div>
<p>
QUI DI SEGUITO Item Json:
<asp:Literal ID="LiteralFilialeJson" runat="server"></asp:Literal>
Client La Filiale Json ID:
<asp:TextBox ID="DDListFilialiJsonValue" runat="server" Enabled="False"></asp:TextBox>
</p>