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

Initialize of grid - CurrentRecord (2009Q1 issue)

1 Answer 36 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sid
Top achievements
Rank 1
Sid asked on 18 Mar 2009, 03:15 PM
I installed the 2009-Q1 release and now have an error on my page initialization.

The grid is populated with:

this

 

.grdChurches.ItemsSource = this.Church.GetChurchesByAlpha("A");

 

 

 

 

The grid is fine and the ItemsSource has 125 records, but I have a business object that I'm trying to bind to the currentrecord of grid which when it runs the following line of code says CurrentRecord is null.

DataRecord record = (DataRecord)grdChurches.CurrentRecord;

This worked just fine under 2008-Q3, so when is CurrentRecord populated now?  I tried Records[0] but it also was null.

Thanks,
-Sid.

 

1 Answer, 1 is accepted

Sort by
0
Stefan Dobrev
Telerik team
answered on 19 Mar 2009, 06:30 PM
Hello Sid,

First let me apologize for the problems that we have introduced and the lack of documentation.

You have to subscribe to the DataLoaded event. The records collection will be populated there. Please note that even in the DataLoaded event the CurrentRecord will be null (due to a known bug on our side). But if you will, you can set it to the first element of the Records collection that will be correctly populated.

Best wishes,
Stefan Dobrev
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Sid
Top achievements
Rank 1
Answers by
Stefan Dobrev
Telerik team
Share this question
or