Jump to content

[TfgCollectionView] How to filter TfgCollectionView by value in TfgSearchEdit?


Luke

Recommended Posts

Hi All,
I'm trying to use a tfgSearchEdit with a tfgCollectionView.
I'm searching the better way to set the focus to the CollectionViewitem that match my search value.

There is a demo that explain this management ?
I've seen that i can fill the SearchEdit.Suggestions with the CollectionViewItems field otherwise i can do a binarysearch in the Tlist<> that is linked to the CollectionView but i've to sort the list.

Can you suggest a best practise for that ?
Thanks a lot,
Luca.

 

Link to comment
Share on other sites

  • Administrators

Hello Luke,

TfgSearchEdit doesn't depend on other controls. It just provide text input field with autocomplete functionality. And it supports 2 ways for getting autocomplete values:

  1. Static. Manual setting of values via Suggestions property. For small values list.
  2. Dynamic. You fill suggestions list in OnChanging event.

The CollectionView filtering method is fully provided to you. For example:

  1. You can filter your collection view model data (related TList, model, DAO and etc) and invoke ReloadItems.
  2. Also if you provide unique item's id via OnGetItemID, collection view will animate refreshing items. So user will see which items are disappeared.

Thank you

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...