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

GridViewDataColumn Custom Filtering

7 Answers 171 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Scott Rakestraw
Top achievements
Rank 1
Scott Rakestraw asked on 18 Nov 2009, 08:54 PM
I have the latest internal build installed.  When I have custom filtering on for it and after I apply a filter and then remove it I get the following error.

Unhandled Error in Silverlight Application 
Code: 4004    
Category: ManagedRuntimeError       
Message: System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Telerik.Windows.Controls.GridView.IndexTree.Set(Int32 index, Double value)
   at Telerik.Windows.Controls.GridView.IndexTree.set_Item(Int32 index, Double value)
   at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)

This error only happens when it is a GridViewdataColumn.  If I change the column for example to a GridViewComboBoxColumn the error does not happen.

7 Answers, 1 is accepted

Sort by
0
Missing User
answered on 19 Nov 2009, 10:44 AM
Hello Scott Rakestraw,

Unfortunately I was not able to reproduce the problem.
You will help us greatly if you send us a small sample project (via support ticket), reproducing this issue, so that we can debug and fix it as soon as possible.
Thanks in advance.

Kind regards,
Anastasia
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Scott Rakestraw
Top achievements
Rank 1
answered on 23 Nov 2009, 05:27 PM
I actually found that the problem is that if you have a column that is off the screen and you filter on that column when you go back to try and remove the filter it will throw the error.  This is happening when I have both custom filters and using the built in filter control.
0
Rossen Hristov
Telerik team
answered on 24 Nov 2009, 10:54 AM
Hello Scott Rakestraw,

How do you apply the filter and clear it -- programmatically or through the UI? Can you send us a small sample project that we can debug to reproduce this issue. Also specify the exact steps we need to make in order to crash the application. Thanks in advance.

All the best,
Ross
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Scott Rakestraw
Top achievements
Rank 1
answered on 24 Nov 2009, 02:41 PM
I can do this with a very simple sample.  I just created a class that had 15 columns so you it will have enough columns so that they are not all shown on load.  To recreate the problem just scroll to a column that is not visible on load.  Apply a filter and it will put you back at the beginning of the row.  Scroll back over to that column and clear the filter and the error will happen at that point.  I am using the 1116 internal build.

<UserControl x:Class="CustomFilter.MainPage" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"  
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"  
    xmlns:telerikGrid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" 
    mc:Ignorable="d"
    <Grid x:Name="LayoutRoot"
        <telerikGrid:RadGridView x:Name="myGrid" AutoGenerateColumns="False" /> 
    </Grid> 
</UserControl>

Partial Public Class MainPage 
    Inherits UserControl 
 
    Public GridData As New List(Of MyData) 
 
    Public Sub New() 
        InitializeComponent() 
        For x As Integer = 1 To 100 
            GridData.Add(New MyData) 
        Next 
    End Sub 
 
    Private Sub MainPage_Loaded(ByVal sender As ObjectByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded 
 
        For x As Integer = 1 To 15 
 
            Dim binding As New System.Windows.Data.Binding("Column" + x.ToString) 
            binding.Mode = Data.BindingMode.TwoWay 
 
            Dim column As New Telerik.Windows.Controls.GridViewDataColumn 
            column.Header = "Column " + x.ToString 
            column.UniqueName = "Column" + x.ToString 
            column.DataMemberBinding = binding 
            column.DataType = GetType(String
            column.IsFilterable = True 
            column.TextWrapping = TextWrapping.Wrap 
            myGrid.Columns.Add(column) 
 
        Next 
 
        myGrid.ItemsSource = GridData 
 
    End Sub 
 
    Public Class MyData 
 
        Private _Column1 As String 
        Private _Column2 As String 
        Private _Column3 As String 
        Private _Column4 As String 
        Private _Column5 As String 
        Private _Column6 As String 
        Private _Column7 As String 
        Private _Column8 As String 
        Private _Column9 As String 
        Private _Column10 As String 
        Private _Column11 As String 
        Private _Column12 As String 
        Private _Column13 As String 
        Private _Column14 As String 
        Private _Column15 As String 
        Public Property Column1() As String 
            Get 
                Return _Column1 
            End Get 
            Set(ByVal Value As String
                _Column1 = Value 
            End Set 
        End Property 
 
        Public Property Column2() As String 
            Get 
                Return _Column2 
            End Get 
            Set(ByVal Value As String
                _Column2 = Value 
            End Set 
        End Property 
 
        Public Property Column3() As String 
            Get 
                Return _Column3 
            End Get 
            Set(ByVal Value As String
                _Column3 = Value 
            End Set 
        End Property 
 
        Public Property Column4() As String 
            Get 
                Return _Column4 
            End Get 
            Set(ByVal Value As String
                _Column4 = Value 
            End Set 
        End Property 
 
        Public Property Column5() As String 
            Get 
                Return _Column5 
            End Get 
            Set(ByVal Value As String
                _Column5 = Value 
            End Set 
        End Property 
 
        Public Property Column6() As String 
            Get 
                Return _Column6 
            End Get 
            Set(ByVal Value As String
                _Column6 = Value 
            End Set 
        End Property 
 
        Public Property Column7() As String 
            Get 
                Return _Column7 
            End Get 
            Set(ByVal Value As String
                _Column7 = Value 
            End Set 
        End Property 
 
        Public Property Column8() As String 
            Get 
                Return _Column8 
            End Get 
            Set(ByVal Value As String
                _Column8 = Value 
            End Set 
        End Property 
 
        Public Property Column9() As String 
            Get 
                Return _Column9 
            End Get 
            Set(ByVal Value As String
                _Column9 = Value 
            End Set 
        End Property 
 
        Public Property Column10() As String 
            Get 
                Return _Column10 
            End Get 
            Set(ByVal Value As String
                _Column10 = Value 
            End Set 
        End Property 
 
        Public Property Column11() As String 
            Get 
                Return _Column11 
            End Get 
            Set(ByVal Value As String
                _Column11 = Value 
            End Set 
        End Property 
 
        Public Property Column12() As String 
            Get 
                Return _Column12 
            End Get 
            Set(ByVal Value As String
                _Column12 = Value 
            End Set 
        End Property 
 
        Public Property Column13() As String 
            Get 
                Return _Column13 
            End Get 
            Set(ByVal Value As String
                _Column13 = Value 
            End Set 
        End Property 
 
        Public Property Column14() As String 
            Get 
                Return _Column14 
            End Get 
            Set(ByVal Value As String
                _Column14 = Value 
            End Set 
        End Property 
 
        Public Property Column15() As String 
            Get 
                Return _Column15 
            End Get 
            Set(ByVal Value As String
                _Column15 = Value 
            End Set 
        End Property 
 
        Public Sub New() 
            Column1 = Guid.NewGuid.ToString 
            Column2 = Guid.NewGuid.ToString 
            Column3 = Guid.NewGuid.ToString 
            Column4 = Guid.NewGuid.ToString 
            Column5 = Guid.NewGuid.ToString 
            Column6 = Guid.NewGuid.ToString 
            Column7 = Guid.NewGuid.ToString 
            Column8 = Guid.NewGuid.ToString 
            Column9 = Guid.NewGuid.ToString 
            Column10 = Guid.NewGuid.ToString 
            Column11 = Guid.NewGuid.ToString 
            Column12 = Guid.NewGuid.ToString 
            Column13 = Guid.NewGuid.ToString 
            Column14 = Guid.NewGuid.ToString 
            Column15 = Guid.NewGuid.ToString 
        End Sub 
 
    End Class 
 
End Class 

0
Rossen Hristov
Telerik team
answered on 27 Nov 2009, 02:04 PM
Hello Scott Rakestraw,

We have identified the issue and will start working on it right away. Thank you for reporting it. I have updated your account with Telerik points.

All the best,
Ross
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Ed
Top achievements
Rank 1
answered on 22 Jun 2011, 11:11 PM

Hi,

I am using version 2010.3.1110.1040 and still experiencing this issue. Can you confirm that this has been fixed in a subsequent release?

 

thanks,

Edmund

0
Hristo
Telerik team
answered on 23 Jun 2011, 12:18 PM
Hi Ed,

Yes, the fix for the problem reported in this thread was included in the next versions of the controls, respectively - the version you are using contains it. I have just tested the scenario mentioned in the previous posts and everything works fine with 2010.3.1110 version. Could you please specify more details about your grid and custom filtering so we can reproduce the problem? Also, the exact steps we have to follow on reproducing it would be plus. Thank you in advance.
 
Regards,
Hristo
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
Tags
GridView
Asked by
Scott Rakestraw
Top achievements
Rank 1
Answers by
Missing User
Scott Rakestraw
Top achievements
Rank 1
Rossen Hristov
Telerik team
Ed
Top achievements
Rank 1
Hristo
Telerik team
Share this question
or