Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > CustomTable DataList View modes: 
User avatar
Member
Member
KevinP - 1/28/2010 3:05:54 PM
   
CustomTable DataList
How do you customize the CustomTable datalist? I am using a custom table to create an association between another custom table "Program" and documents. The join table contains a column for ProgramID and a column for DocumentID. I have used the drop-down list to customize the edit form, but the datalist only shows the ID's. The ID's are useless to the editor.

User avatar
Member
Member
Scott - 1/30/2010 2:20:08 PM
   
RE:CustomTable DataList
I've had similar situations and I've had to do a lookup. That will get slow when there are many more records.

The concept of Custom Views should be added in my opinion.

I suppose we could achieve that by using the queries tab, but I'm not familiar with that myself yet.

User avatar
Kentico Developer
Kentico Developer
kentico_martind - 2/1/2010 10:21:20 AM
   
RE:CustomTable DataList
Hi Scott,

You can optionally use 'Repeater with custom query' web part (instead of 'Custom table datalist') and write custom query for it that will join appropriate (custom) tables and return required data.

Best Regards,

Martin Dobsicek

User avatar
Kentico Developer
Kentico Developer
kentico_martind - 2/1/2010 10:06:32 AM
   
RE:CustomTable DataList
Hi Kevin,

Data are displayed using transformation. You can optionally create custom function for transformation as described in Adding custom functions to transformations article in Dev.Guide. Into this function you can write custom code that will return appropriate value for given ID from your custom table.

Alternatively you can use approach I've suggested to Scott above.

Best Regards,

Martin Dobsicek

User avatar
Member
Member
KevinP - 2/1/2010 1:11:23 PM
   
RE:CustomTable DataList
Thanks for both your responses. My question, however, is not how to do it in a data repeater on a page.

I am asking how to do this for the CustomTable datalist within the CMS Desk? The only customization options are to choose which columns display in the list or to change the layout of the edit form for an individual record.

User avatar
Kentico Developer
Kentico Developer
kentico_martind - 2/17/2010 4:21:28 AM
   
RE:CustomTable DataList
Hi Kevin,

Regrettably this is not natively supported by CustomTable datalist within the CMS Desk. You would need to modify SiteManager -> Development -> Custom tables -> edit your table -> Queries -> 'selectall' query and in this query make join with other tables and select names instead of IDs in it. But you would need to make this change anytime you add new field to CustomTable. Alternatively, you could create custom query there and then call this query using ExecuteQuery method and set returned DataSet as data source for GridView in ~\CMSModules\CustomTables\Controls\CustomTableDataList.ascx(.cs) files.

Best Regards,

Martin Dobsicek

User avatar
Member
Member
mnavarro-tiempodeveliopment - 2/14/2013 11:59:06 AM
   
RE:CustomTable DataList
What is the way to use a queries element in this datalist?

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 2/15/2013 1:20:44 AM
   
RE:CustomTable DataList
Hi,

Please note that you're responding to a 3-year old post in the 4.x version forum. Are you really asking about the functionality in this context?
If yes, could you please be more specific about your aim?

Regards,
Zdenek