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

Javascript error in IE8/9 with Radgrid - Solved

0 Answers 31 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ken
Top achievements
Rank 1
Ken asked on 06 Mar 2012, 09:46 PM
Thought I would save others a bit of grief after solving a problem.  Symptoms:  page with RadMultiPage views with a RadGrid not on the default view.  All works great on FF, Safari, Chrome. 

On IE 9 in standard and compatibility mode get a javascript error regarding "unable to get value of the property 'Cols': object is  null..."

After doing some digging, it turned out that though the page view with the RadGrid wasn't being displayed until a button was pressed which also initialized a session variable with the grid data, the RadGrid's NeedsData function was firing and the DataSource was being set to nothing.  It went from:

rgdData.DataSource = Session("GridData")

to:

Dim dv As DataView = Nothing
Try
     dv = Session("GridData")
Catch ex As Exception
     dv = Nothing
End Try
If Not dv Is Nothing Then rgdData.DataSource = dv

The IE error went away!

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Ken
Top achievements
Rank 1
Share this question
or