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

NullReferenceException in DetailListViewElement.ProcessMouseUp event

2 Answers 58 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 31 Jan 2018, 12:35 PM

Hi,

since some days, I got the title's related null reference exception when I click on item on RadListView control in DetailView mode. 

Have you any idea? If i use the same control with the same data inside it but set mode to ListView al works without any problem (but I can't do this, due to a complex series of routine formatting details view elements according to the type and the structure of the data inside of it). The exception was thrown inside Telerik.WinControl.UI, on the event indicated. I cannot intercept any event before the crash, so the application quit unexpectedly.

 

Routing causing the exception is:

 

private void lvRecords_CurrentItemChanged(object sender, ListViewItemEventArgs e)
        {
            if (e.Item != null)            
                CaricaDettaglio(e.Item.DataBoundItem as BaseEntity<int>);
            else
            {
                spDetails.Collapsed = true;
                spGestioneCustom.Collapsed = true;
            }
        }

where, by the call CaricaDettaglio, I made some changes on the form, loading some data into other controls based on the e.Item.DataboundItem, an entity of my application. I've also noticed that if I double click on form bar to resize it, if the mouse passes through the control during the form resize, the same event was fired, with the same result, without any further click on it, and this is really unattended.

 

DLL version is 2016.2.608.40 but I don't want updgrade project to latest Telerik Library if not necessary.

 

Have you any idea or suggestion?

 

Thanks in advance.

2 Answers, 1 is accepted

Sort by
0
Daniel
Top achievements
Rank 1
answered on 31 Jan 2018, 12:48 PM

Ok, after some hours of investigation, the problem is control.BeginUpdate / .EndUpdate placed into a routine dedicated to the bestfist of the radlistview. For some reason, in this particular scenario, this causes the error indicated if called here...

I've no time to investigate further to understand the real cause of the problem.

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 31 Jan 2018, 02:45 PM
Hello, Daniel,

Thank you for writing.  

Calling BeginUpdate/EndUpdate methods are used to optimize performance. As a result only one refresh operation will be triggered. Following the provided information, I was unable to reproduce the issue you are facing. I have attached my sample project. Could you please specify the exact steps how to reproduce the problem? Thank you in advance. 

I am looking forward to your reply.

 Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
ListView
Asked by
Daniel
Top achievements
Rank 1
Answers by
Daniel
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or