This is a migrated thread and some comments may be shown as answers.

Non-breaking Space in RadGrid

1 Answer 155 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 20 Sep 2011, 04:23 PM
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:
<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.

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 23 Sep 2011, 07:42 AM
Hello Matt,

This issue is fixed in the latest version. Upgrade to Q2 2011 SP1.

Regards,
Iana Tsolova
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Grid
Asked by
Mark
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or