I've got a bound column that may contain null values. If I try to use filtering on it such as "contains" or "equal", I'm getting a javascript error "Object reference not set to an instance of the object". I believe the generated logic should check for null before applying the "contains" filter. Am I doing something wrong here or is it a bug? In some posts I found that EnableLinqExpressions="false" would fix something like that. However, when I try to do that I'm getting
Server Error in '/' Application.
Thanks,
Alex
Server Error in '/' Application.
Cannot interpret token '?' at position 12
The grid is bound to a list of objects and is defined as follows<
telerik:RadGrid
ID
=
"EmployeesRadGrid"
runat
=
"server"
AutoGenerateColumns
=
"false"
AllowPaging
=
"true"
OnNeedDataSource
=
"EmployeesRadGrid_NeedDataSource"
EnableLinqExpressions
=
"false"
oninit
=
"EmployeesRadGrid_Init"
onitemcommand
=
"EmployeesRadGrid_ItemCommand"
>
<
GroupingSettings
CaseSensitive
=
"False"
/>
<
ExportSettings
HideStructureColumns
=
"true"
FileName
=
"Employees"
Excel-Format
=
"Biff"
OpenInNewWindow
=
"false"
Excel-FileExtension
=
"xls"
IgnorePaging
=
"true"
ExportOnlyData
=
"false"
/>
<
MasterTableView
EditMode
=
"PopUp"
AllowFilteringByColumn
=
"true"
AllowSorting
=
"true"
CommandItemDisplay
=
"Top"
>
<
CommandItemSettings
ShowExportToExcelButton
=
"true"
ExportToExcelText
=
"Export to Excel"
ShowAddNewRecordButton
=
"false"
/>
<
Columns
>
<
telerik:GridHyperLinkColumn
DataNavigateUrlFields
=
"PersonnelNo"
UniqueName
=
"Edit"
AllowFiltering
=
"false"
DataNavigateUrlFormatString
=
"EditEmployee.aspx?PersonnelNo={0}"
Text
=
"Edit"
>
</
telerik:GridHyperLinkColumn
>
<
telerik:GridCalculatedColumn
HeaderTooltip
=
"*= override"
Expression
=
"IsOverriden? Convert.ToChar(42): Convert.ToChar(32)"
AllowFiltering
=
"false"
>
</
telerik:GridCalculatedColumn
>
<
telerik:GridBoundColumn
DataField
=
"RacfID"
HeaderText
=
"RACF ID"
CurrentFilterFunction
=
"Contains"
FilterControlWidth
=
"4em"
AutoPostBackOnFilter
=
"true"
ShowFilterIcon
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"FullName"
HeaderText
=
"Name"
CurrentFilterFunction
=
"Contains"
AutoPostBackOnFilter
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"PositionName"
HeaderText
=
"Job Title"
CurrentFilterFunction
=
"Contains"
FilterControlToolTip
=
"Enter search value and press Tab or Enter"
FilterControlWidth
=
"9em"
AutoPostBackOnFilter
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"PersonnelAreaDescription"
HeaderText
=
"Work Location"
CurrentFilterFunction
=
"Contains"
FilterControlWidth
=
"11em"
AutoPostBackOnFilter
=
"true"
ShowFilterIcon
=
"false"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"OrgUnit"
HeaderText
=
"Org Unit"
CurrentFilterFunction
=
"Contains"
FilterControlWidth
=
"6em"
AutoPostBackOnFilter
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"BusinessSalesUnit"
HeaderText
=
"Sls-Bus Unit"
FilterDelay
=
"10000"
FilterControlWidth
=
"4em"
AutoPostBackOnFilter
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"DeptRegion"
HeaderText
=
"Dept-Region"
CurrentFilterFunction
=
"Contains"
FilterControlWidth
=
"4em"
AutoPostBackOnFilter
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"CostCenterDisplay"
HeaderText
=
"Cost center"
CurrentFilterFunction
=
"Contains"
FilterControlWidth
=
"4em"
AutoPostBackOnFilter
=
"true"
>
</
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
Thanks,
Alex