Checkbox problem?

Hi,

The listview has that weird behavior when setup with checkbox.

Let's create a list with checkbox and then group them by some field.

Then when I assign datasource with a new source or assign to null it will throw an exception


This property is related to its paint event and then the control crashes.

Another example. When I change .showcheckbox from true to False. then it will also lead to this exception.


Please check!


My wish: this property .checkitems returns null when the source is empty or when showcheckbox=false. and the checkbox no longer draws when changing .showcheckbox=false.


This would save me from having to recreate another class or set the datasource from scratch.

Thanks you!


Object reference not set to an instance of an object.


************** Exception Text **************

System.NullReferenceException: Object reference not set to an instance of an object.

   at Syncfusion.WinForms.ListView.SfListView.get_CheckedItems()

   at Syncfusion.WinForms.ListView.SfListView.UnWiredEvents()

   at Syncfusion.WinForms.ListView.SfListView.RefreshViewAndContainer(Object oldValue, Object newValue)

   at Syncfusion.WinForms.ListView.ListViewPainter.OnPaint(PaintEventArgs e, Size clientSize)

   at Syncfusion.WinForms.ListView.SfListView.OnPaint(PaintEventArgs e)

   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)

   at System.Windows.Forms.Control.WmPaint(Message& m)

   at System.Windows.Forms.Control.WndProc(Message& m)

   at Syncfusion.WinForms.Controls.SfScrollControl.WndProc(Message& msg)

   at Syncfusion.WinForms.ListView.SfListView.WndProc(Message& m)

   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)





Attachment: Desktop_3a1df25.rar


2 Replies

BS Bhaskar Suresh Syncfusion Team November 28, 2024 12:48 PM UTC

Hi Jamin,


We are unable to reproduce the reported issue based on the given information. Please refer to the sample and video provided for your reference.

Could you please share the following information so that we can better analyze the issue and provide a solution?

  • Core or Framework version of the application.
  • Version of your Syncfusion package used in the application.
  • Modified sample that replicates the issue.


Regards,

Bhaskar Suresh


Attachment: SfListView_F195311_96bbfce.zip


JA jamin December 3, 2024 02:08 PM UTC

Hi  Bhaskar,

Thanks you!, I will try to reproduce the problem in the next few days.


Loader.
Up arrow icon