Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > CMS:UniView View modes: 
User avatar
Member
Member
quynh.tran-fastsigns - 10/22/2009 9:06:12 AM
   
CMS:UniView
Does the cms:UniView control used on the forum thread have an OnItemDataBound/OnDataBinding/OnDataBind event? If so how is it used? i could not find any examples on this.

I am trying to customize the forum threads to highlight new unread items by individual users.

Thanks,
Quynh

User avatar
Kentico Developer
Kentico Developer
kentico_martind - 10/27/2009 5:17:07 AM
   
RE:CMS:UniView
Hi Quynh,

You can define handlers for this event in cod-behind of appropriate page using sample code bellow:


protected void Page_Load(object sender, EventArgs e)
{
//...
listAttachment.OnItemDataBound += new CMS.Controls.UniView.DataBindEvent(listAttachment_OnItemDataBound);
listAttachment.DataBound += new EventHandler(listAttachment_DataBound);
//...
}

void listAttachment_DataBound(object sender, EventArgs e)
{
//put your code here
}

void listAttachment_OnItemDataBound(object sender, CMS.Controls.UniViewItem item)
{
//put your code here
}


Best Regards,

Martin Dobsicek