Posted on: 5/14/2014 5:34:01 PM | Views : 275

Hi,
I got a listbox (from Telerik), On my OnItemDataBound event, it crashed with the following error on the follwing code line. I can't figure out why is it crashing. I can see all the fields in teh DataItem when I am stepping through the debugger.

          e.Item.Attributes.Add("CASE_ID", (e.Item.DataItem as DataRowView)["Quantity"].ToString());

Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Line 233: protected void rlboxAvailableCaseNumbers_ItemDataBound(object sender, RadListBoxItemEven ...

Go to the complete details ...