C
Colin Basterfield
Hi,
I have a DataSet whose default table, namely DataSet.Tables[0] which has a
row for each day selected from a database, however not all the days are
always there so I am iterating thro each day and if it is missing I add it
to the table by way of a new row with default values. The DataSet is then
passed thro a web service to a Web front end and then shown on a grid.
The problem I have is that I want the days to appear Mon thro' Sunday, but
as I am adding them at the end of the Rows, they will not appear in the
right order. I thought about using InsertAt, but depending on the number of
days already there or inserted it would be tedious to have to work out which
position to InsertAt, to get them in the right order at that stage.
So to save my little brain getting a buzzing noise is there an existing way
to do this, I was thinking of using DataTable.Select, but wasn't sure how to
get it back into the original dataset to pass thro'.
Any ideas?
TIA
Colin B
I have a DataSet whose default table, namely DataSet.Tables[0] which has a
row for each day selected from a database, however not all the days are
always there so I am iterating thro each day and if it is missing I add it
to the table by way of a new row with default values. The DataSet is then
passed thro a web service to a Web front end and then shown on a grid.
The problem I have is that I want the days to appear Mon thro' Sunday, but
as I am adding them at the end of the Rows, they will not appear in the
right order. I thought about using InsertAt, but depending on the number of
days already there or inserted it would be tedious to have to work out which
position to InsertAt, to get them in the right order at that stage.
So to save my little brain getting a buzzing noise is there an existing way
to do this, I was thinking of using DataTable.Select, but wasn't sure how to
get it back into the original dataset to pass thro'.
Any ideas?
TIA
Colin B