i have a BooundColumn in my telerik RadGrid like below :
Status Column in my sql server 2008 database can accept null values and RadGrid shows them with an empty string.
so i replaced those Empty Strings with the codes below ?
now my problem is i can not filter Empty Columns.
how can i fix this issue?
Note:
In the codes upper
thanks in advance
<
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.
so i replaced those Empty Strings with the codes below ?
protected
void
grdSMS_ItemDataBound(
object
sender, GridItemEventArgs e)
{
if
(e.Item
is
GridDataItem)
{
GridDataItem item = (GridDataItem)e.Item;
if
(item[
"Status"
].Text ==
" "
)
{
item[
"Status"
].ForeColor = Color.Red;
item[
"Status"
].Text =
"Empty"
;
}
}
}
now my problem is i can not filter Empty Columns.
how can i fix this issue?
Note:
In the codes upper
if
(item[
"Status"
].Text ==
" "
)
Correction Is
if
(item[
"Status"
].Text ==
" "
)
thanks in advance