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

RowCreated has null _dataItem

1 Answer 61 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jonathan Coy
Top achievements
Rank 1
Jonathan Coy asked on 16 Jun 2010, 03:59 PM
Hi

I am using Ajax controls Q1 2010 RadGrid control for client side binding. I need to format rows based on the values in the returned row.  I found a good postng on how to do this (see here) but when I try to access the row data using eventArgs.get_gridDataItem().get_dataItem() in the RowCreated client event it always returns null.  Is this by design as it seems rather odd.  Strangely I am using the RowSelected event on the same grid and it returns the data without any problem.

Can anyone help me???

Cheers
Jonny

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 21 Jun 2010, 11:39 AM
Hello Jonathan,

You do not have access to the JSON data item for the respective grid row in the RowCreated client event. Use RowDataBound instead, similar to the RadGrid client-side programmatic binding demo. In the event handler, the event argument's get_dataItem() function will return the JSON data item for the databound row.

All the best,
Veli
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Jonathan Coy
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or