I have a column named 'Unread' in my Rad grid. Please see the following aspx code.
I am binding an image if there is an most resent update on the column.
Please find the code for the StatusIcon() method below.
I want to make it a default sorted column to show the unread items first.
Kindly help me accomplishing this.
<
Telerik:RadGrid
ID
=
"MessageBoardRadGrid"
Width
=
"100%"
AllowSorting
=
"True"
PageSize
=
"15"
AllowPaging
=
"True"
AllowMultiRowSelection
=
"True"
runat
=
"server"
Gridlines
=
Both
HeaderStyle-Font-Bold
=
true
AutoGenerateColumns
=
"False"
>
<
PagerStyle
Mode
=
"NextPrevAndNumeric"
/>
<
MasterTableView
DataKeyNames
=
"Name"
AutoGenerateColumns
=
"false"
>
<
Columns
>
<
Telerik:GridTemplateColumn
DataField
=
"Unread"
HeaderText
=
"Unread"
HeaderStyle-CssClass
=
"gridheader"
>
<
ItemTemplate
>
<%# Formatter.StatusIcon( (Forum) Container.DataItem ) %>
</
ItemTemplate
>
</
Telerik:GridTemplateColumn
>
I am binding an image if there is an most resent update on the column.
Please find the code for the StatusIcon() method below.
if (forum.LastUserActivity < forum.MostRecentPostDate)
{
icon = "forum_status_new_ln.gif";
alt = ResourceManager.GetString("IconAlt_NewPosts");
}
I want to make it a default sorted column to show the unread items first.
Kindly help me accomplishing this.