Type of SfListView Items to access them via code.

Hello,


What is the type of SfListView Items so that I can change their Check State Programmatically.  There are various examples mentioned about accessing DataSource and making changes there but that somehow (I don't know why) not working for me. 


I'm currently trying to write a generalized code that access the items of SfListView (independent of DataSource Type)and change their checkstate causing ItemChecked event to get triggered to perform some action.


foreach (var item in LstView_MainList.View.Items)

{

        item.checkedstate = false; //this will cause a ItemChecked Event Trigger

}

Above code is just for reference to help you understand what exactly I want. Any help will be appreciated.


Note: Again I'm mentioning that I don't want the data that the Item refers to but I want to access the item itself.




16 Replies

SG shankul gupta October 11, 2021 08:05 AM UTC

I guess what I'm looking for is ListViewItemInfo but still how do I fetch the Item from SfListView


Edit: I want to programmatically alter the checkstate of the list items inside SfListView to trigger the ItemChecked Event for each item being processed.


Edit: I've tried using ListViewItemInfo by passing the SfListView that is filled with some data yet it returned null.



SN Sudharsan Narayanan Syncfusion Team October 11, 2021 01:07 PM UTC

Hi Shankul,
We have checked the reported issue that “
Type of SfListView Items to access them via code” from our end. We have prepared the sample to achieve the requirement. So please find the sample from the below location,
Sample:
https://www.syncfusion.com/downloads/support/forum/169537/ze/SfListView_CheckedItems414451256
Please check the above sample and let me know your concerns.
Regards,
Sudharsan



SG shankul gupta October 13, 2021 05:06 AM UTC

Thank you for the reply but the program you provided is not getting compiled. A compile time exception is being thrown as soon as I hit run. I changed the code a bit for it get compiled but now the program is not running with a null reference exception which I cannot determine as there is nothing in stack trace.



SG shankul gupta October 13, 2021 08:59 AM UTC

Ok, so I was able to updates the check state of the items visually but still no event is fired when check changes. I'm attaching a sample project so that I can share what I've done till now. 



Attachment: SfListViewAdvSample_14a65df2.7z


SN Sudharsan Narayanan Syncfusion Team October 18, 2021 11:30 AM UTC

Hi Shankul,

We can be able to reproduce the reported issue from our end and we have logged a bug report on this. The issue for this fix is included in NuGet on 02nd November 2021. You can track the status of the issue using the feedback link below,

Feedbackhttps://www.syncfusion.com/feedback/29511/itemchecked-event-is-not-triggered-when-changing-checked-items-programmatically-in

We appreciate your patience until then.

Regards,

Sudharsan



SG shankul gupta October 21, 2021 10:36 AM UTC

the feedback link says its not associated with my account? is there a mistake?



SN Sudharsan Narayanan Syncfusion Team October 22, 2021 10:48 AM UTC

Hi Shankul,

Thanks for the update,

We have checked your access issue with our internal team. We have provided the access to you and now you can be able to access the feedback link. Please check at your end once and let us know the link is accessible or not. Also, let us know if you need any further assistance.

Regards,
Sudharsan



SG shankul gupta November 2, 2021 06:57 AM UTC

Hello, I cannot find this Bug Report in my feedback section? was this already discovered before my post or is it some human error ?



SN Sudharsan Narayanan Syncfusion Team November 3, 2021 03:14 AM UTC

Hi Shankul,

Thanks for the patience,

The reported issue “SfListView event not triggered” has been fixed. 
 
         
This patch which can be download from the below links.           
  
Recommended approach - exe will perform automatic configuration.            
       
Please find the patch setup from below location:           
         
 
Please find the patch assemblies alone from below location:            
        
 
            
Installation Directions:            
This patch should replace the files " Syncfusion.SfListView.Windows” under the following folder.            
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\[TargetFramework]            
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\19.3.0.43\precompiledassemblies\19.3.0.43\ 4.6  
            
To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you must manually copy and paste them to the preferred location or you must run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.            
            
            
Disclaimer:            
Please note that we have created this patch for version 19.3.0.43 specifically to resolve the issue reported in this incident. If you have received other patches for the same version for other products, please apply all patches in the order received.  Please let us know, if you are using any other Syncfusion version, we will provide patch in your version.     

Note: This Issue will be included in your upcoming NuGet and Main Release.

Please confirm if the fixed is resolved your reported issue. Based on your confirmation, w
e will prepare the documentation and publish it ASAP at our end. Also, please let us know if you need any further assistance on this. We will be glad to assist you. 
  
Please let us know if you need any further assistance on this. We will be glad to assist you. 

Regards,
 
Sudharsan   


SG shankul gupta November 11, 2021 08:36 AM UTC

My Current assembly version is 18.4.0.39 can you please recompile the patch for the same.



SN Sudharsan Narayanan Syncfusion Team November 12, 2021 06:29 AM UTC

Hi Shankul,

Thanks for the patience,

The reported issue “SfListView event not triggered” has been fixed. 
 
         
This patch which can be download from the below links.           
  
Recommended approach - exe will perform automatic configuration.            
       
Please find the patch setup from below location:           
         
 
Please find the patch assemblies alone from below location:            
        
 
            
Installation Directions:            
This patch should replace the files " Syncfusion.SfListView.Windows” under the following folder.            
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\[TargetFramework]            
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\18.4.0.39\precompiledassemblies\18.4.0.39\ 4.6  
            
To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you must manually copy and paste them to the preferred location or you must run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.            
            
            
Disclaimer:            
Please note that we have created this patch for version 18.4.0.39 specifically to resolve the issue reported in this incident. If you have received other patches for the same version for other products, please apply all patches in the order received.  Please let us know, if you are using any other Syncfusion version, we will provide patch in your version.     

Note: This Issue will be included in your upcoming NuGet and Main Release.

Please confirm if the fixed is resolved your reported issue. Based on your confirmation, we will prepare the documentation and publish it ASAP at our end. Also, please let us know if you need any further assistance on this. We will be glad to assist you. 
 
 
Please let us know if you need any further assistance on this. We will be glad to assist you. 

Regards,
 
Sudharsan   


SG shankul gupta November 12, 2021 07:44 AM UTC

Hey I tried Installing the patch manually and via nuget packager manager also but its not working the event is still not getting triggered.


Edit: Also tried creating a totally new project and using the control from patched assembly but still no result.



SN Sudharsan Narayanan Syncfusion Team November 15, 2021 12:22 PM UTC

Hi Shankul,

Thanks for the update,

We have checked the reported issue with the most recent patch is not triggering the event from our end. We check with the patch in our sample, and it is working fine from our side. So, can you please check the patch assemblies are properly applying to your application. We have checked and recorded the video of patch working, find the below video

Video: https://www.syncfusion.com/downloads/support/forum/169537/ze/ListViewEvent-1722802688

Please check the above video if you are still facing the same issue. So could you please provide your scenario sample and reproducing steps with the video. It will be helpful to prompt the solution.

Regards,
Sudharsan



SG shankul gupta November 22, 2021 07:43 AM UTC

Well I can see that its exactly how I want but I request you to please have a look at the video I'm attaching. 


Attachment: SFLVFRM_e973a0b3.7z


SN Sudharsan Narayanan Syncfusion Team November 24, 2021 03:52 AM UTC

Hi Shankul,

Thanks for the update,

Currently, we are analyzing your reported issue of “Event does not trigger in the SfListView”. We will validate and update you the details on or before 25th November 2021.

Regards,
 
Sudharsan 



SN Sudharsan Narayanan Syncfusion Team November 30, 2021 04:17 AM UTC

Hi Shankul,

Thanks for the patience,

The reported issue “SfListView event not triggered” has been fixed. 
 
         
This patch which can be download from the below links.           
  
Recommended approach - exe will perform automatic configuration.            
       
Please find the patch setup from below location:           
         
 
Please find the patch assemblies alone from below location:            
        
 
            
Installation Directions:            
This patch should replace the files " Syncfusion.SfListView.Windows” under the following folder.            
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\[TargetFramework]            
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\18.4.0.39\precompiledassemblies\18.4.0.39\ 4.6  
            
To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you must manually copy and paste them to the preferred location or you must run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.            
            
            
Disclaimer:            
Please note that we have created this patch for version 18.4.0.39 specifically to resolve the issue reported in this incident. If you have received other patches for the same version for other products, please apply all patches in the order received.  Please let us know, if you are using any other Syncfusion version, we will provide patch in your version.     

Note: This Issue will be included in your upcoming NuGet and Main Release.

Please confirm if the fixed is resolved your reported issue. Based on your confirmation, we will prepare the documentation and publish it ASAP at our end. Also, please let us know if you need any further assistance on this. We will be glad to assist you. 
 
 
Please let us know if you need any further assistance on this. We will be glad to assist you. 

Regards,
 
Sudharsan

Loader.
Up arrow icon