I don't really understand what the purpose of the processing has to do with
how to set a datasource and converting it to a DataTable, but I don't mind
giving a little spoiler on what I'm doing (nobody won't know the overall of
the project just by this tiny bit anyway)
I must itterate in the rows and find some columns (colums names provided by
the user in a property of the object) and display the values of these
columns in graphs and charts...
I know that most bindable controls can receive Arrays, List, SortedList,
Dictionaries, DataTable, DataView, DataSet, et al. All thos controls don't
behave the same at all when it comes to retrieve the data, so I don't want
my objects to always try to find which object I'm working with... If
there's an easy way of doing it, I wanna know... I just don't want to do if
(datasource is DataSet) DoSomething; if (datasource is somethingelse)
DoSomethingElse; and so on... If I can't do without it, I'll do it, but if I
can do without, I'd prefer to do without...

and preferably I don't want
to inherit from DataBoundControl because I'm not developing a control yet...
the Data-Bound object is only a class that will be used in many of my
controls...
Thanks
ThunderMusic
"Cor Ligthert [MVP]" <(E-Mail Removed)> a écrit dans le message de
news:
(E-Mail Removed)...
> Thundermusic,
>
> What has that class to do?
>
> Cor
>
> "ThunderMusic" <NO.danlat.at.hotmail.com.SPAM> schreef in bericht
> news:(E-Mail Removed)...
>> Hi,
>> This question probably went back a couple of times, but I didn't find
>> anything about it on google, so I ask here...
>>
>> What is the best way to use the DataSource/DataBind pattern in a class? I
>> would like the user to be able to set a data source and I'd like my class
>> to be able to use this datasource to build a DataTable I could use for
>> further processing...
>>
>> Can it be done? if it can, how?
>>
>> Thanks
>>
>> ThunderMusic
>>
>
>