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.
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.
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.
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.
Sudharsan
the feedback link says its not associated with my account? is there a mistake?
Hello, I cannot find this Bug Report in my feedback section? was this already discovered before my post or is it some human error ?
My Current assembly version is 18.4.0.39 can you please recompile the patch for the same.
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.
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.