Hey Elsaeed,
As error clearly says, the widget on which you are trying to apply dynamic classes expects a data view outside and you need to place widget inside it, data view will have data source as context of object selection_number, then only this error will resolved.
Hope this helps
Thanks & Regards,
Naman Khard