First of all, thank you for choosing Ext.NET!
Second, I think
my initial answer about two-way data binding was not ideal. I said it is not presented in Ext.NET v2. But I meant two-way
DOM-based data binding and it is AngularJS or Binder.js that you try to use with Ext.NET.
What is a two-way data binding? I like
this answer:
Two-way binding just means that:
- When properties in the model get updated, so does the UI.
- When UI elements get updated, the changes get propagated back to the model.
So, I believe the two-way data binding is supported in Ext.NET v2.
1. You update the Store (data layer) the TreePanel (UI) layer is being updated as well.
2. You updated the TreePanel (UI layer), for example, editing a node's text, the data is Store is being updated.
I would like to demonstrate it with an example that proves that the two statements above work in Ext.NET v2.
Example
<%@ Page Language="C#" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title>Ext.NET v2 Example</title>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:Button
runat="server"
Text="Get a node's text"
Handler="alert(App.TreePanel1.getStore().getNodeById('Node1').get('text'));" />
<ext:Button
runat="server"
Text="Set a node's text"
Handler="App.TreePanel1.getStore().getNodeById('Node1').set('text', 'New Text');" />
<ext:TreePanel ID="TreePanel1" runat="server">
<Root>
<ext:Node Text="Root" Expanded="true">
<Children>
<ext:Node NodeID="Node1" Text="Node 1" Leaf="true" />
<ext:Node NodeID="Node2" Text="Node 2" Leaf="true" />
</Children>
</ext:Node>
</Root>
<Editor>
<ext:TextField runat="server" />
</Editor>
<Plugins>
<ext:CellEditing runat="server" />
</Plugins>
</ext:TreePanel>
</form>
</body>
</html>
So, I believe that Ext.NET 2 can be stated as supporting two-way data binding. Moreover, it is very essential part of Ext.NET and underlying ExtJS. Many people (including me) prefer and like Ext.NET/ExtJS specifically because of its data package.
The two-way data binding functionality has been significantly improved in ExtJS 5 and, therefore, in Ext.NET 3. For example, see:
https://examples3.ext.net/#/Data_Binding/Basic/Two_Way
https://examples3.ext.net/#/Data_Bin...o_Way_Formulas
Please look at the other examples as well (all the examples in the Data Binding folder).
But a direct DOM-based two-way binding is not quite presented in Ext.NET and ExtJS. I should say that is not quite supposed to. ExtJS/Ext.NET applications are not supposed to deal with raw HTML markup a lot. Certainly, HTML might be used here and there. In some cases, there is the only way to use HTML. But the major philosophy is all about OOP and using Ext.NET and ExtJS Components. I am afraid that without following this philosophy it might be problematic to use Ext.NET and ExtJS.
Anyways, we are here to help, but, I am afraid, we cannot add anymore regarding using Binder.js.