Kentico CMS 6.0 Developer's Guide

Managing data in custom tables

Managing data in custom tables

Previous topic Next topic Mail us feedback on this topic!  

Managing data in custom tables

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

The interface for management of data items stored in custom tables is located in CMS Desk -> Tools -> Custom tables. This is where content editors can edit the data. The same interface is also available to administrators in Site Manager -> Development -> Custom tables -> edit (Edit) -> Data, as described at the bottom of this page.

 

devguide_clip0526

 

In the following example, you will learn how to add data into the sample People custom table we have created in the Creating custom tables chapter. The procedure is the same for any other custom table (except for the fields, which are always specific for a particular table):

 

1. Click the Edit (Edit) icon next to the People table. A blank page with a header as in the following screenshot will be displayed. The page is blank because there is no data in the custom table yet.

 

devguide_clip0527

 

2. Click the NewRecord New item link. The form that you can see in the following screenshot will be displayed. Enter some testing data and click OK.

 

devguide_clip0528

 

3. The data you entered has been saved into the custom table. Now you can either edit it or use the NewRecord Create another link to create another data record. Try creating at least two other records.

 

4. When you're finished, switch back to the Custom tables listing in CMS Desk -> Tools and choose to Edit (Edit) the People custom table. You should see a list of entries where the blank page was in step 1, before entering the records.

 

The data records can be Edited (Edit) or Deleted (Delete). You can also re-order records in the listing using the Up (Up) and Down (Down). The order is be stored in the ItemOrder property of each data record.

 

devguide_clip0948

 

You can also create a filter for filtering displayed records in cases where large numbers of records are displayed (as can be seen in the screenshot above). To learn more about this possibility, please refer to Modules -> Alternative forms -> Creating filter forms.

 

5. You can choose which fields should be displayed in the listing by clicking the SelectFields Select displayed fields link. The window depicted in the following screenshot will be displayed. Using the check-boxes, you can determine which fields are to be displayed in the listing. When you make the selection and click OK, you should see the result immediately.

 

devguide_clip0529

 

6. If you click the View (View) icon next to any of the data records, detailed information about the record will be displayed in a pop-up window. All details will be displayed, no matter which fields are selected to be displayed in the listing.

 

devguide_clip0547

 

Custom tables data management in Site Manager

 

The same user interface as described above is also available in Site Manager -> Development -> Custom tables. It is located on the Data tab of each custom table's interface displayed after clicking the Edit (Edit) icon in the custom tables list. The functionality provided on this tab is identical to what is described above, providing administrators with access to Site Manager with custom tables data management possibilities without the need to switch to CMS Desk.

 

devguide_clip0189