Detect listview cell values change by another event

6 posts, 1 answers
  1. Khanh
    Khanh avatar
    25 posts
    Member since:
    Sep 2019

    Posted 13 Sep 2019 Link to this post

    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

     

  2. Answer
    Nadya
    Admin
    Nadya avatar
    344 posts

    Posted 17 Sep 2019 Link to this post

    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.
  3. Khanh
    Khanh avatar
    25 posts
    Member since:
    Sep 2019

    Posted 17 Sep 2019 in reply to Nadya Link to this post

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

     

  4. Nadya
    Admin
    Nadya avatar
    344 posts

    Posted 19 Sep 2019 Link to this post

    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.
  5. Khanh
    Khanh avatar
    25 posts
    Member since:
    Sep 2019

    Posted 20 Sep 2019 in reply to Nadya Link to this post

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

    Thanks a lot.

     

  6. Nadya
    Admin
    Nadya avatar
    344 posts

    Posted 20 Sep 2019 Link to this post

    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.
Back to Top