If I am using a view I load it with no data and then create the indexes. On an empty view this takes no time to speak of. Then when the view is requeried the indexes are there. That way views and tables can be treated exactly the same. I just tell the grid which index tag goes with which column/header.
HTH
Barbara
>I'm working on a grid class that contains a custom header. Clicking the header will do the sort. I would like to sort the view by
>creating an index on the fly or by selecting the index if it is a table and the index exists. How can I determine if the souce is a table or a view?