Module Create Custom Tables

Delford Chaffin asked on March 7, 2014 11:04

I'm trying to develop a module that needs to use some custom classes. I think using the existing custom tables functionality will help here, but I'm wondering if there is a way to create the custom tables I need programmatically rather than creating them manually and separate from the module.

I see in the custom tables API where I can CRUD items in tables, but not tables themselves. Can this be done in, for example, the module loader class? Are there any examples along these lines anyone is aware of?


Recent Answers

Brenden Kehren answered on March 7, 2014 14:15

Take a look at /CMSModules/CustomTables/CustomTable_New.aspcx and .cs. There is a NewClassWizard control on that page that you should be able to use or get some from code from. Here is the location of the control /CMSModules/AdminControls/Controls/Class/NewClassWizard.ascx

You can also create a page in your module that references the already created page to create a custom table too. You can find that functionality in /CMSModules/CustomTables/CustomTable_List.aspx.cs lines 10, 11 and 12.

0 votesVote for this answer Mark as a Correct answer

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