Select the search type
  • Site
  • Web
Search
You are here:  Support/Forums
Support

Bring2mind Forums

Category Shortlist: How to add attributes to grid?
Last Post 03/29/2010 3:09 PM by Peter Donker. 3 Replies.
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
jsumant
New Member
New Member
Posts:20


--
03/20/2010 3:00 PM

I would like to use category shortlist addon for displaying files. Is it possible to display additional attributes for each record? If yes can some one post sample code to achieve it.

Thanks.

Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
03/23/2010 10:50 AM
Hi Sumant,

If you're familiar with asp.net you'll recognize a datagrid in CatShortList.ascx. It displays several columns from the retrieved data table. You can add custom attributes by including their "key" there. You can look up the key in DMX_Attributes or you can see it when you go to the Attributes screen. Note you should be on DMX 5.2.2 or higher. Let me know if this doesn't work.

Peter
jsumant
New Member
New Member
Posts:20


--
03/29/2010 8:40 AM

Hi Peter,

I managed to display additional attribute in the datagrid using following code

<%#Bring2mind.DNN.Modules.DMX.Business.EntryAttributesController.GetEntryAttributeByEntryAndKey(DataBinder.Eval(Container, "DataItem.PortalId"), DataBinder.Eval(Container, "DataItem.EntryId"), "att4", System.Threading.Thread.CurrentThread.CurrentCulture.Name).Value%>       

Just let me know is there any better way to retrieve attribute value?

Sumant

Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
03/29/2010 3:09 PM
Hi Sumant,

This method is correct. You might want to add some code one day to cater for the event that an entry does not have an entryattribute record for that attribute. That would make the solution more robust. The code would need to be added to the code behind of the addon, so you may want to hold off until this event actually happens.

Peter
You are not authorized to post a reply.