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
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
Thanks for the quick reply.
I will try your solution and see what happens. I am not very good with javascript though, could you give me an example on the script needed to add the record to the child?
Please give me an example on how to add child record, either in javascript or VB,
Thanks
Hi,
You cannot add rows in VB. At that point, you should add it straight to your data source and then rebind the grid.In JS, once you have the grid object (parent or child), you can call grid.get_rows().add(valArray); where valArray is an array of values to add that match the order of the columns.
Ok, give me an example of javascript to get the childgrid and add a row even if the row is empty