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

    Hello,

    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:

    ASPX:
    <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">
                <NoRecordsTemplate>
                    <div>
                        Geen items gevonden.</div>
                </NoRecordsTemplate>
                <Columns>
                </Columns>
            </MasterTableView>
            <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True" ReorderColumnsOnClient="True">
                <Selecting AllowRowSelect="True" />
                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
            </ClientSettings>
        </telerik:RadGrid>
    </telerik:RadAjaxPanel>




  2. Pavlina
    Admin
    Pavlina avatar
    6084 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.
    http://www.telerik.com/community/forums/aspnet/grid/why-can-t-i-group-by-fields-with-a-space-in-the-field-name.aspx

    Best wishes,
    Pavlina
    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top