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

Grouping with OnNeedDatasource and space in column names error

1 Answer 71 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 2
Yeroon asked on 01 Sep 2010, 10:22 AM

Using the 3.5 assemblie Q2 2010.

When I have a grid who gets its data from the onneeddatasource event and any of my columns has space in the name the grouping won't work.

When I try to group on the column: Leading Country,  the error message will be:

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Field Leading not found in the source table. Please check the expression syntax.

I don't really want to replace spaces with underscores to solve this. Is there anything I am missing here?

Below my code:

<telerik:RadAjaxPanel ID="rap" runat="server" Width="90%">
    <telerik:RadGrid ID="rg" runat="server" AllowAutomaticInserts="false" Skin="Office2007"
        AllowFilteringByColumn="True" GroupingEnabled="true" EnableViewState="true" AllowPaging="True"
        AllowSorting="True" AutoGenerateColumns="True" GridLines="None" ShowStatusBar="True"
        OnNeedDataSource="rg_NeedDataSource" EnableLinqExpressions="true" PageSize="20"
        Width="97%" ShowGroupPanel="true" OnColumnCreated="rg_ColCreated">
        <MasterTableView EnableNoRecordsTemplate="true" CellSpacing="-1" CommandItemDisplay="None"
            AllowMultiColumnSorting="true" PagerStyle-Position="Bottom" PagerStyle-Mode="NextPrevAndNumeric"
            ClientDataKeyNames="oid" DataKeyNames="oid">
                    Geen items gevonden.</div>
        <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True" ReorderColumnsOnClient="True">
            <Selecting AllowRowSelect="True" />
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 01 Sep 2010, 11:23 AM
Hi Yeroon,

RadGrid grouping works only with unique column names without space. Please check out the following Forum link which discusses the same issue.

Best wishes,
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Asked by
Top achievements
Rank 2
Answers by
Telerik team
Share this question