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

'cells' is null or not an object

1 Answer 49 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pether Wiklander
Top achievements
Rank 2
Pether Wiklander asked on 14 Jan 2009, 10:26 AM
Hi,

I'm trying to set up a RadGrid with a static header and no scrolling. The entire grid is created in OnInit on the server.

protected override void OnInit( EventArgs e ) 
            base.OnInit( e ); 
 
            _radGrid = new RadGrid 
            { 
                Height = Unit.Pixel( 400 ), 
                Width = Unit.Pixel( 400 ) 
            }; 
            _radGrid.MasterTableView.AllowPaging = false
            _radGrid.ClientSettings.Scrolling.UseStaticHeaders = true
            _radGrid.ClientSettings.Scrolling.SaveScrollPosition = true
            _radGrid.ClientSettings.Scrolling.AllowScroll = true
            _radGrid.NeedDataSource += RadGrid_NeedDataSource; 
 
... 

When I run the page, I get the javascript error " 'cells' is null or not an object" on line 4 below (RadGrid script).
var _108=this._owner.get_masterTableViewHeader().HeaderRow; 
var _109=0; 
if(_107){ 
_109=Math.min(_108.cells.length,_107.cells.length); 

If I remove "_radGrid.ClientSettings.Scrolling.UseStaticHeaders = true;", everything works fine. Any suggestions on how to solve this?

// Pether


1 Answer, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 16 Jan 2009, 11:34 AM
Hi Pether Wiklander,

I'm afraid that I'm unable to reproduce the described behavior locally. Can you please provide us a small runnable project (attached to a formal ticket)  in which this behavior can be observed?

Greetings,
Rosen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Pether Wiklander
Top achievements
Rank 2
Answers by
Rosen
Telerik team
Share this question
or