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

Setting edit property at ItemDataBound - new BUG?

2 Answers 34 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Christoph
Top achievements
Rank 1
Christoph asked on 20 Dec 2008, 12:10 AM
Hello!

I have a radgrid where i have to set the edit property of the rows to true or false, if the sorting was changed because of an update.
I'm doing this at ItemDataBound.
This worked fine for me all the time - I had never a problem with that.
Today I made an update from Q3 to the latest version of telerik. 
Since this update I'm getting an error (Object reference not set to an instance of an object).
This error occurs right after ItemDataBound - so my error handling does not fire an error. The problem occurs after one of this events. The error occurs before the DataBound Event.

So I have two versions with the same code - one with the older dll and one with the newer dll - With the older one everything is fine and the newer one is making problems. So I'm afraid of upgrading versions in future - but i will have to do that!

The code:

If

 

(TypeOf (e.Item) Is GridDataItem) Then

 

 

Dim dataBoundItem As GridDataItem = Nothing

 

 

Dim bFound As Boolean = False

 

 

Try

 

dataBoundItem = e.Item

 

If Session("sessSaveIds") <> "" Then

 

 

Dim sArrayString As String = Session("sessSaveIds")

 

 

Dim sArray() As String = sArrayString.Split(",")

 

 

Dim sID As String

 

 

For Each sID In sArray

 

 

If dataBoundItem("user_id").Text = sID Then

 

bFound =

True

 

 

Exit For

 

 

End If

 

 

Next

 

 

If bFound = True Then

 

dataBoundItem.Edit =

True

 

 

Else

 

dataBoundItem.Edit =

False

 

 

End If

 

 

End If ...

 



What can I do? Please help me!

2 Answers, 1 is accepted

Sort by
0
Christoph
Top achievements
Rank 1
answered on 22 Dec 2008, 09:04 AM
No ideas?
0
Georgi Krustev
Telerik team
answered on 22 Dec 2008, 03:50 PM
Hello Christoph,

Unfortunately we could not reproduce the issue which you described. I attached my test web site to this forum post to try it on your machine. I tested your implementation with the official Q3 2008 version and with the latest version 2008.3.1125 of RadControls for ASP.NET AJAX. There were no issues with both of them.

We will ask you if the problem still exists, to make changes to the attached test project in order to reproduce it and send it back via a support ticket for further examination.

Kind regards,
Georgi Krustev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Christoph
Top achievements
Rank 1
Answers by
Christoph
Top achievements
Rank 1
Georgi Krustev
Telerik team
Share this question
or