Autocomplete - no data found

repeater-widget

#1

Hi,

I’ve created an auto complete using a repeater. However, when I can’t find a value that matches the autocomplete, I would like a message to pop up underneath saying “no match”. This is very similar to the “optional tags” when posting this message.
I haven’t been able to find any information on how I might do this. Any assistance that can be provided will be appreciated.

auto complete no data found.rp (52.7 KB)

Thanks
Ross


Display No Results Found in Repeater
#2

Hi!

Yes, when a filter filters out all rows, the OnItemLoad handler doesn’t run at all, so you need other means to figure out when the filter returns no rows.

A good way is to wrap the repeater in a fit-to-content dynamic panel, and place the following into this dynamic panel’s OnResize event

OnResize (of dynamic panel that wraps the repeater)
  If (value) [[This.height]] is equal to 0
     show no-rows-found message
  Else if
     hide no-rows-found message

This works because a fit-to-content dynamic panel changes its height based on its content, and when a repeater (its sole content) has no rows, the repeater’s height is 0


#3

Hi Joseph,

Thanks for your help. I got this working.

I’ve uploaded the rp file just in case others find this helpful.

auto complete no data found.rp (58.7 KB)
Thanks


closed #4

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.