i have a BooundColumn in my telerik RadGrid like below :
<telerik:GridBoundColumn DataField="Status" FilterControlAltText="Filter Status column"
HeaderText="Status" SortExpression="Status" UniqueName="Status"
FilterImageToolTip="Filter">
<HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</telerik:GridBoundColumn>
Status Column in my sql server 2008 database can accept null values and RadGrid shows them with an empty string.
how can i replace these Empty Strings
with a Colorable Strings
?
mean replacement with something like this -> <span style='color: red;'>Empty</span>
i know i can convert that BoundColumn to TemplateColumn like this :
<telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn_Status column"
HeaderText="Status" UniqueName="TemplateColumn_Status" FilterImageToolTip="Filter"
ReadOnly="False" Visible="False">
<ItemTemplate>
<asp:Label ID="lblStatusInsideGrd" runat="server" Font-Size="11px" Text='<%# (bool)Convert.IsDBNull(Eval("Status")) ? "<span class=\"lblInsideGrd\">Empty</span>" : Eval("Status") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</telerik:GridTemplateColumn>
this replacement is a good idea and works great. but by doing that i lose RadGrid Filering
on this column.
would you please showe me another way with keeping RadGrid Friltering?
thanks in advance