Last Updated: 14 Oct 2015 08:45 by ADMIN
Created on: 09 Oct 2015 06:30
Category: GridView
Type: Bug Report
FIX. RadGridView - NullreferenceException when a DataView filter is set in the FilterExpressionChanged event and combobox column is filtered.
To reproduce:
- Bind the grid to a DataView. The grid must have combo box column.
- Change the filter of the DataView like this:

Private Sub MasterTemplate_FilterExpressionChanged(sender As Object, e As FilterExpressionChangedEventArgs) Handles RadGridView.FilterExpressionChanged
    _companies.RowFilter = e.FilterExpression
End Sub

- Set a filter to the combo box column and then set reset by selecting no filter in the drop down. 

Public Class MyGridFilterComboBoxCellElement
	Inherits GridFilterComboBoxCellElement

	Public Sub New(ByVal col As GridViewDataColumn, ByVal row As GridRowElement)
		MyBase.New(col, row)
	End Sub
	Protected Overrides Sub SetContentCore(ByVal value As Object)
		If Me.ComboBoxColumnInfo IsNot Nothing Then
		End If

	End Sub
End Class

Private Sub radGridView1_CreateCell(ByVal sender As Object, ByVal e As GridViewCreateCellEventArgs)
	If e.CellType Is GetType(GridFilterComboBoxCellElement) Then
		e.CellType = GetType(MyGridFilterComboBoxCellElement)
	End If

End Sub
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)