0
votes

I read posts and seen examples but I am still strugling with setting up hierarchy grid with one popup editor form for both master/detail record(s).

I would like to setup a simple grid with html row detail where grid data source is a nested json:

persons = [
  { name:"john", surname:"smith" },
  { name:"jane", surname:"doe", 
      contact: [
        { type:"email", value:"jane.doe@domain.com" },
        { type:"phone", value:"012345678" }
      ]
  }
]

Top grid level displays name and surname where detail template shows simple list of contacts (if any).

Grid needs to be editable through a popup editor where both data (master and detail) can be edited. Name and surname are binded to one form where contacts are displayed in a simple grid binded to a separate "contact" form located above it.

<form input fields for name and surname>

<form input fields for contacts, binded to a contacts table>
<contacts table>

<save><update><cancel>

Problems:

  1. in detail row initialization I only get top level data (no contacts) so I am unable to render detail row with list of contacts

  2. how to handle contacts part in popup editor? how to bind data?

Thank you for all your input, Peter

1
Can you share all your code in a jsfiddle?Rahul Gupta
If you are using HierarchicalDatasource with the grid, then according to this post telerik.com/forums/… it is currently not supportedRahul Gupta
I am a beginner and strugling with simple stuff. I am not using hierarchicaldatasource as it is not supported as such by grid widget yet. I will try to setup some fiddle.hpet
I have put together a fiddle where you can see what I would like to accomplish: jsfiddle.net/hLsgzsuq/2 What you get is a person=>contact detail with edit option where you can edit person and contact details all on one "form". Clicking a contact binds form fields. Because my data is hierarchical I would like to find a way how to manage it this way and keep "update/cancel" functionality. Right now canceling needs some smart workaround as detail listview is not aware of a rollback. If someone can correct/modify and build upon that fiddle so it will behave correctly?hpet

1 Answers

0
votes

Found out that editing misbehaved due to missing "record id". Once I provided unique id I am getting expected results.

Duplicated question here.