Hi,
We have a grid with a GridDropDownColumn, the values for this column are shown as non-breakign space ' ' when the data is an empty string. This is our column in the grid:
I have tried to use the following code on the on item data bound event:
However our edit column is being overwritten with an empty string. Any help would be appreciated.
We have a grid with a GridDropDownColumn, the values for this column are shown as non-breakign space ' ' when the data is an empty string. This is our column in the grid:
<
telerik:GridDropDownColumn
FilterControlWidth
=
"250px"
DataField
=
"country_id"
DataSourceID
=
"sds_countries"
HeaderText
=
"Country"
ListTextField
=
"name"
ListValueField
=
"country_id"
UniqueName
=
"country_id"
>
<
FilterTemplate
>
<
telerik:RadComboBox
ID
=
"ddl_countries"
DataSourceID
=
"sds_countries"
DataTextField
=
"name"
DataValueField
=
"country_id"
AppendDataBoundItems
=
"true"
SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("country_id").CurrentFilterValue %>'
runat="server" OnClientSelectedIndexChanged="CountryChanged">
<
Items
>
<
telerik:RadComboBoxItem
Text
=
"All"
/>
</
Items
>
</
telerik:RadComboBox
>
<
telerik:RadScriptBlock
ID
=
"rsb_countries"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function CountryChanged(sender, args) {
var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
tableView.filter("country_id", args.get_item().get_value(), "EqualTo");
}
</
script
>
</
telerik:RadScriptBlock
>
</
FilterTemplate
>
<
HeaderStyle
Width
=
"180px"
/>
</
telerik:GridDropDownColumn
>
I have tried to use the following code on the on item data bound event:
if (e.Item is GridDataItem)
{
foreach (TableCell cell in e.Item.Cells)
{
cell
if (cell.Text == " ")
cell.Text = "";
}
}
However our edit column is being overwritten with an empty string. Any help would be appreciated.