Error deleting BizForm entries

Mark Elliott asked on February 17, 2017 18:46

I resolved this error but wanted to share in case anyone else ran into this issue. We were encountering an error whenever we tried to delete an entry from a bizform we created. After some digging around and comparing it with other bizforms we had I noticed that in the grid listing the recorded data the ID field was not the first column in the grid.

I moved the ID field to the first column and now can delete with no problem. It seems that in the gridData_OnAction event that when it goes to get the recordId:

// Get record ID
int formRecordID = ValidationHelper.GetInteger(actionArgument, 0);

that it assumes the recordId is the first column, which was not the case

Just wanted to pass this along if anyone else runs into this issue.

Correct Answer

Trevor Fayas answered on February 17, 2017 23:04

I think that Recorded data grid should also be a unigrid, so you may be able to extend it using a custom module extension to set that if you wanted, but having the ID as the first column is good as well!

This may be where you would look, depending on what you are extending

https://docs.kentico.com/k10/custom-development/creating-custom-modules/creating-extenders-for-module-interface-pages

0 votesVote for this answer Unmark Correct answer

Recent Answers


Trevor Fayas answered on February 17, 2017 21:30 (last edited on February 17, 2017 21:30)

Thanks for posting.

You can adjust what parameter is sent as the actionArgument through the "commandargument" parameter, which takes the column name. See below!

commandargument - The name of the column whose value the action passes as the actionArgument parameter of OnAction event handlers.

If not defined, the action uses the first column in the source data.

https://docs.kentico.com/k10/references/kentico-controls/ui-controls/unigrid/reference-unigrid-definition

0 votesVote for this answer Mark as a Correct answer

Mark Elliott answered on February 17, 2017 22:02

Hey Trevor,

Thanks for the response. Its good to know you can control that when using the unigrid. In this case it was the grid on the Recorded Data that was causing the issue. It just wasn't readily apparent without doing some digging that the ID column has to be the first column in order for the actions to work.

0 votesVote for this answer Mark as a Correct answer

Mark Elliott answered on February 18, 2017 00:32

Yeah it does seem like those extenders for the UniGrid would be the way to go. Thanks!

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.