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

Grouping bug in build 1002

1 Answer 25 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Morten
Top achievements
Rank 1
Iron
Iron
Veteran
Morten asked on 23 Oct 2014, 12:49 PM
Hi,

I found an other problem in the grid. If you have two columns bound to the same datafield grouping will fail with the following error:
An item with the same key has already been added

Example:
<telerik:RadGrid ClientSettings-AllowDragToGroup="true" ShowGroupPanel="true" ShowFooter="true" runat="server" ID="rg" AutoGenerateColumns="False" GroupPanelPosition="Top">
                <MasterTableView>
                    <Columns>
                        <telerik:GridBoundColumn HeaderText="id" DataField="id"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn HeaderText="value 1" DataField="Value" UniqueName="Value1"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn HeaderText="value 2" DataField="Value" UniqueName="Value2"></telerik:GridBoundColumn>
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>

Code behind:
Protected Sub rg_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles rg.NeedDataSource
        If e.IsFromDetailTable = False Then
 
            Dim dt As New DataTable()
            dt.Columns.Add("id", GetType(Integer))
            dt.Columns.Add("text", GetType(String))
            dt.Columns.Add("value", GetType(Double))
 
            Dim r As DataRow
 
            r = dt.NewRow()
            r("id") = "1"
            r("text") = "nr. 1"
            r("value") = 1.5
            dt.Rows.Add(r)
 
            r = dt.NewRow()
            r("id") = "2"
            r("text") = "nr. 2"
            r("value") = 2.5
            dt.Rows.Add(r)
 
            rg.DataSource = dt
        End If
    End Sub

 

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 28 Oct 2014, 10:11 AM
Hello Morten,

I was able to replicate the problematic behavior locally and it appears that this behavior is a bug that we introduced after the Q3 2014 Beta release .
I have logged this issue in our tracking system and our dev team will do their best to fix it as soon as possible.

As a token of gratitude for reporting this case you will find your Telerik points updated.

Regards,
Maria Ilieva
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Morten
Top achievements
Rank 1
Iron
Iron
Veteran
Answers by
Maria Ilieva
Telerik team
Share this question
or