Apr 16, 2012, 3:20 AM
[CLOSED] How to bind a ComboBox RecordField in runtime?
Hi,
This code sample is based on the Northwind database and I'm working with .netTiers ORM. The FullName property of the entity is not available on the server and has to be created some time later. I've got a combobox as follows:
Thanks,
Vadym
This code sample is based on the Northwind database and I'm working with .netTiers ORM. The FullName property of the entity is not available on the server and has to be created some time later. I've got a combobox as follows:
<ext:ComboBox ID="Combo1" runat="server" DisplayField="FullName" ValueField="EmployeeID">
<Store>
<ext:Store ID="Store1" AutoLoad="true" runat="server">
<Reader>
<ext:JsonReader>
<Fields>
<ext:RecordField Name="EmployeeID" ServerMapping="entityData.EmployeeId" />
<ext:RecordField Name="LastName" ServerMapping="entityData.LastName" />
<ext:RecordField Name="FirstName" ServerMapping="entityData.FirstName" />
<ext:RecordField Name="FullName" />
</Fields>
</ext:JsonReader>
</Reader>
<Listeners>
<Load Fn="employeesRender" />
</Listeners>
</ext:Store>
</Store>
</ext:ComboBox>
<script type="text/javascript">
var employeesRender = function () {
// Create a FullName record and databind the FullName RecordField of Store1
};
</script>
I'm trying to concatenate the LastName and FirstName values in runtime in order to assign the resulting value to the FullName RecordField of the COmbobox store. Please advise how to approach this kind of situation.Thanks,
Vadym
Last edited by Daniil; Apr 16, 2012 at 12:52 PM.
Reason: [CLOSED]