UniGrid code generation

ruben verschueren asked on September 24, 2018 13:11

I'm still learning Kentico and I wonder if there is some tool that can generate a UniGrid definition (xml) file for a class? it seems to me that most of the time this will be closely related to the generated info class.

I would for instance like to create a class in a custom module with x fields and have the option in the code tab to also generate Unigrid definitions. A basic object listing, new/edit definitions should be relatively easy to create. Ideally I would have a 'create new' button in the object listing defnition so that I can create a record when the listing is empty.

Edit: I found that the CMSModules_Modules_Pages_Class_Code class takes care of the code generation so I should be possible. Has anyone already done this?

Correct Answer

David te Kloese answered on September 24, 2018 13:29

Unfortunately no auto generation, but you can follow this guide it's not that complicated: docs.kentico.com/.../Addingclassestomodules

Some extra info on the unigrid options you can find here: docs.kentico.com/.../reference-unigrid-definition

0 votesVote for this answer Unmark Correct answer

Recent Answers


ruben verschueren answered on September 24, 2018 13:33

Hi David. Thank you for the links. I know it's not complicated, which is why I would prefer to have it generated :).

Once I'm up to speed with Kentico I'll look into extending the generators. seems to me, that everyone could benefit from this as I've found a few questions about linking edit pages and such regarding UniGrid.

0 votesVote for this answer Mark as a Correct answer

David te Kloese answered on September 24, 2018 13:42

Would be a welcomed addition Ruben!

check out the Marketplace or Custom modules development on some pointers for your extension docs.kentico.com/.../example-creating-a-packageable-module

0 votesVote for this answer Mark as a Correct answer

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