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

RadListView refresh

1 Answer 250 Views
ListControl
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 02 Apr 2018, 06:11 PM

Hello,

I have a RadListView with custom SimpleListViewVisualItem which has a button.  When an item is selected in the listview control the button is visible and hidden when it is not (only one button shows at a time on the selected index). This is working just fine using the "VisualItemFormatting" functionality. 

Now I am trying trying to enable a different mode in the interface which eliminates the functionality that the button provides so should remove the option of the button for the user (hide it).  I am not sure how to "repaint" the listview control so that the VisualItemFormatting function can kick in and remove the button on the selected index and put it back in when returning to that mode.

Any suggestions?  I've tried updating the list and the viewelement but it doesn't seem to have an effect.

Thanks!

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 04 Apr 2018, 09:18 AM
Hello, Mike,   

In order to force the VisualItemFormatting event to be triggered, you can simply call the RadListView.ListViewElement.SynchronizeVisualItems method.

I am not sure how exactly you create the custom visual items but it would very useful if you look at the following help article: https://docs.telerik.com/devtools/winforms/listview/custom-items

I hope this information helps. If you have any additional questions, please let me know. 

Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
ListControl
Asked by
Mike
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or