I'm trying to create a grid that uses RadDataForm to display and to edit row details, and which also supports insert and delete of rows.
My current problem is getting insert to work using the same form layout as the edit. By default, the insert-row drops you into editing the row in the grid, rather than editing a new record in a detail DataForm.
Browsing the forums showed me this thread - and with this I was able to override the GridViewNewRow template - but if that's only part of the solution, at best.
My grid has ShowInsertRow="False", instead I have a button that triggers RadGridViewCommands.BeginInsert. When I click that, I still end up editing the rows of the grid, and not in a DataForm.
When I set ShowInsertRow="True", I don't see the "Click here to add new item" row, instead I see my GridViewNewRow template, but clearly bound incorrectly: "BindingExpression path error: 'CurrentItem' property not found on 'object'."
It seems to me that if most people who are displaying and editing row details in a data form, whether a RadDataForm or something custom, are also going to want to insert new rows using that same data form.
But if there's a way to do it, I've not been able to find it.
--- EDITED ---
OK, one thing I've figured out. The GridViewNewRow template only controls the appearance of the "Click here to add new item" row - it has nothing to do with the row on which the editing is actually done. Which still leaves me not knowing how to get the grid to use a RadDataForm for inserting new rows, when it is configured to use a RadDataForm to display and edit rows.
My current problem is getting insert to work using the same form layout as the edit. By default, the insert-row drops you into editing the row in the grid, rather than editing a new record in a detail DataForm.
Browsing the forums showed me this thread - and with this I was able to override the GridViewNewRow template - but if that's only part of the solution, at best.
My grid has ShowInsertRow="False", instead I have a button that triggers RadGridViewCommands.BeginInsert. When I click that, I still end up editing the rows of the grid, and not in a DataForm.
When I set ShowInsertRow="True", I don't see the "Click here to add new item" row, instead I see my GridViewNewRow template, but clearly bound incorrectly: "BindingExpression path error: 'CurrentItem' property not found on 'object'."
It seems to me that if most people who are displaying and editing row details in a data form, whether a RadDataForm or something custom, are also going to want to insert new rows using that same data form.
But if there's a way to do it, I've not been able to find it.
--- EDITED ---
OK, one thing I've figured out. The GridViewNewRow template only controls the appearance of the "Click here to add new item" row - it has nothing to do with the row on which the editing is actually done. Which still leaves me not knowing how to get the grid to use a RadDataForm for inserting new rows, when it is configured to use a RadDataForm to display and edit rows.