Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
155
Add child row via template when clicking cell in parent row?
posted

Is it possible to have a WebHeiarchicalGrid setup so that if you double click in a parent cell(taskid) it allows you to add a record (hopefully via a popup template) to the child row.

What I have in mind is having the grid showing task records and clicking on the taskid column and creating notes that can be added to the task.

Can you please provide an example if possible

 

Jerry

 

Parents
  • 33839
    posted

    Hi Jerry,

    This is not a built in behavior.  You should be able to accomplish what you want with JavaScript however.  You would need to have on the RowAdding behavior in child grids to be able to add children in empty child grids.  You would need InitialDataBindDepth set to 1 to have the child grids on the client.  Then, you'll need to handle doubleClick client event on the grid.  If the target is the appropriate cell, you could open up a WebDialogWindow you have defined.  In there, you could have your template to add the new row.  You would have a button to add a row that closes the dialog, takes the info out of the inputs or whatever and then adds a row in the child grid of the parent row that was clicked.

    regards,
    David Young 

Reply Children