Click to See Complete Forum and Search --> : Sorting of DataGrid when DataSource-objecttype is unknown


Metaphor
September 8th, 2004, 09:46 AM
Yo,

I've got this here DataGrid-control I'm building. I'm trying to implement multiple-column sort, which isn't all that difficult if I knew beforehand what the objecttype of the DataSource would be (for instance DataSet, DataView, DataReader). That is completely unknown to me, as this component will be used by... well. Users.

Does anyone have any ideas, hints, paths towards solutions?

MRutledge
September 8th, 2004, 10:33 AM
Is there anyway you can require a dataview to be passed to your sorting function? Or can you take in an object and cast it to a dataview?

Metaphor
September 8th, 2004, 10:51 AM
DataView == massive overheard, compared to slim objects like DataReaders, unfortunately. One has to sacrifice speed and size for comfortable functionality. ;)

Metaphor
September 8th, 2004, 12:22 PM
Okay. Rephrase and rethink.

Is there any way to access the data of the object given to the DataSource-property before the DataBind-event?