Grouping with OnNeedDatasource and space in column names error

2 posts, 0 answers
  1. Yeroon
    Yeroon avatar
    87 posts
    Member since:
    Oct 2012

    Posted 01 Sep 2010 Link to this post


    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" />

  2. Pavlina
    Pavlina avatar
    6165 posts

    Posted 01 Sep 2010 Link to this post

    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
Back to Top