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

Detect listview cell values change by another event

5 Answers 1036 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Khanh
Top achievements
Rank 1
Iron
Khanh asked on 13 Sep 2019, 09:58 PM

Hi . I have set up some events for listview on windows form where some events (keydow, rightclick ..) will change listview's cell value, others will work if detecting this value change ( give notice to users, ....)
I used some events:
listview_ItemValuechanged
listview_Text
listview_ItemEdite
listview_ItemValuechanging
however they do not seem to be detected when a change in value occurs from another event

How can i implement this idea?

Thanks a lot

 

5 Answers, 1 is accepted

Sort by
0
Accepted
Nadya | Tech Support Engineer
Telerik team
answered on 17 Sep 2019, 10:23 AM
Hello Khanh,

In this case you can use the CollectionChanged event which fires before the cell value changes:

radListView1.Items.CollectionChanged += Items_CollectionChanged;

private void Items_CollectionChanged(object sender, Telerik.WinControls.Data.NotifyCollectionChangedEventArgs e)
{
    if (e.Action == Telerik.WinControls.Data.NotifyCollectionChangedAction.ItemChanged)
    {
        //TO DO
    }
}

I hope this helps. Should you have any other questions do not hesitate to ask.

Regards,
Nadya
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Khanh
Top achievements
Rank 1
Iron
answered on 17 Sep 2019, 12:15 PM

Thanks Nadya, I will try it as soon as possible :)

 

0
Nadya | Tech Support Engineer
Telerik team
answered on 19 Sep 2019, 05:02 AM
Hello Khanh,

Feel welcome to reach back out whenever it is suitable for you. If you have any questions, I will be glad to help.

Regards,
Nadya
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Khanh
Top achievements
Rank 1
Iron
answered on 20 Sep 2019, 08:50 AM

Hi Nadya, it worked for me
I was quite surprised because events can be controlled on items. haha

Thanks a lot.

 

0
Nadya | Tech Support Engineer
Telerik team
answered on 20 Sep 2019, 11:07 AM

Hello Khanh,

I am glad that this works for you. Please let me know if there is something else I can help you with. 

Regards,
Nadya
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
ListView
Asked by
Khanh
Top achievements
Rank 1
Iron
Answers by
Nadya | Tech Support Engineer
Telerik team
Khanh
Top achievements
Rank 1
Iron
Share this question
or