Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use selection property instead of 'SelectMethod' on ObjectDataSource?

I'm using multiple ObjectDataSources to fill ComboBox-fields in a FormView. The FormView is sort of generic, because it's appearance is different depending on it's category.

The category is defined in the url of the webpage. I'd like to create a class that filters the category out and expose several properties, that can be used to fill the ComboBox-fields.

Problem is, the default ObjectDataSource only got a property 'SelectMethod' to retrieve the data. With this class I'd like to create, it wouldn't be methods, but properties that will contain the data.

Is it someway, somehow still posible to assign a property to the 'SelectMethod' (or similar)? Is it better to use another approach?

Thanks.

like image 805
Herman Cordes Avatar asked Jan 23 '23 15:01

Herman Cordes


1 Answers

Maybe I'm missing something. But if you are after to assign a property as SelectMethod, you have to set it as get_{Property Name}.

like image 162
Mehdi Golchin Avatar answered Apr 26 '23 15:04

Mehdi Golchin