ColumnGroups throws error if datasource is nothing

3 posts, 0 answers
  1. Morten
    Morten avatar
    292 posts
    Member since:
    Jul 2012

    Posted 25 Feb 2016 Link to this post

    Hi,

    RadGrid throws an 'Index was outside the bounds of the array' error when using ColumnGroups and having datasource=nothing.

    Version 2016.1.113.45

    Example throwing error (dont bind grid to datasource):

    <telerik:RadGrid  runat="server" ID="rg">
        <MasterTableView>
            <ColumnGroups>
                <telerik:GridColumnGroup HeaderText="Invoice" Name="Invoice"></telerik:GridColumnGroup>
            </ColumnGroups>
            <Columns>
            <telerik:GridBoundColumn ColumnGroupName="Invoice" HeaderText="Test" DataField="Test"></telerik:GridBoundColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>

     

    Working:

    <telerik:RadGrid  runat="server" ID="rg">
        <MasterTableView>
            <ColumnGroups>
            </ColumnGroups>
            <Columns>
            <telerik:GridBoundColumn  HeaderText="Test" DataField="Test"></telerik:GridBoundColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>

     

  2. Morten
    Morten avatar
    292 posts
    Member since:
    Jul 2012

    Posted 25 Feb 2016 in reply to Morten Link to this post

    Solved in 2016.1.225.45 (a few hours after i posted the error!!!)

    Thanks for quick response!!

  3. Eyup
    Admin
    Eyup avatar
    3155 posts

    Posted 25 Feb 2016 Link to this post

    Hello Morten,

    Yes, you are correct. Here you can find the public item:
    http://feedback.telerik.com/Project/108/Feedback/Details/181607-radgrid-with-column-groups-throws-exception-when-the-control-is-not-databound-ini

    We try to fix the issues breaking our customer's applications immediately.

    Regards,
    Eyup
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top