Hi I have my objects defined as below on server. I am just looking for how to define schema ,model and fields for below objects.
//getting error with unable to get value of property for below popup template for writer drop down .
//writer is Drop Down to select Writer and bind text and value fields as separate columns in agentwriter Grid
Please let me know any info required.
Thanks
Chatrapathi chennam
public class AgentModel //shown in a agent Grid { public int AgentID { get; set; } public string Name { get; set; } //column is shown in agent grid add/edit popup as a field on Tabstrip1 public StateModel State { get; set; } //similar to above field public Boolean IsActive { get; set; } //similar to above field public List<AgentWiterModel> AgentWiters { get; set; } // Shown in AgentWriter grid on Tabstrip2 when add/edit of master Agent grid. }public class AgentWriterModel { public int AgentID { get; set; } //read only public string AgencyID { get; set; } public WriterModel Writer { get; set; } }public class WriterModel { public int WriterID{get;set;} //want to bind this value on popup public string Code{get;set;} public string Name { get; set; } //want to bind and show on popup public Boolean IsActive { get; set; } }schema: { model: { id: "AgentID", Name: "Name", State: "State", IsActive: "IsActive", AgentWiters: "AgentWiters", fields: { AgentID: { type: "int", validation: { required: true} }, Name: { type: "string", validation: { required: true} }, State: { defaultValue: { Value: "", Text: "" }, validation: { required: true} }, IsActive: { type: "boolean", defaultValue: true } } } }On Edit of above model in a agent grid ;will open a below model in a new grid .Which I am facing difficulty to map perfect data-model.schema: { model: { id: "Writer.WriterID", Writer:"Writer", AgentID: "AgentID", AgencyID: "AgencyID", fields: { WriterID: { type: "string", defaultValue: ""}, Writer: { defaultValue: { WriterID: "", Name: ""} }, AgentID: { type: "int" }, AgencyID: { type: "string", validation: { required: true} }, } } } Here I want the Writer grid to map with columns like Writer.WriterID ,Writer.Name and AgencyID to add or edit into Agentwriter Grid.
columns: [
{ field: "AgentID", title: "AgentID", hidden: true },
//{ field: "Writer.WriterID", title: "WriterID", hidden: true },
{ field: "Writer.Name", title: "WriterName" },
{ field: "AgencyID", title: "Agency ID"},
{ field: "Writer.IsActive", title: "Status", hidden: true },
]//getting error with unable to get value of property for below popup template for writer drop down .
//writer is Drop Down to select Writer and bind text and value fields as separate columns in agentwriter Grid
<table>
<tr> <td> <label for="Writer" class="required">Name * :</label> </td> <td> <input id="Writer" name="Writer" data-bind="value:Writer" /> </td> </tr> <tr> <td> <label for="WriterID" class="required">Writer ID * :</label> </td> <td> <input type="text" id="WriterID" class="k-input k-textbox" name="WriterID" data-bind="value:Writer.WriterID" /> </td> </tr> <tr> <td> <label for="AgencyID" class="required">Agency ID * :</label> </td> <td> <input type="text" id="AgencyID" class="k-input k-textbox" name="AgencyID" data-bind="value:AgencyID" /> </td> </tr>
</table>Please let me know any info required.
Thanks
Chatrapathi chennam