;

PDA

Click to See Complete Forum and Search --> : Force DataGrid Sort (Alphabetize after adding items)


erobertwald
12-08-2008, 11:40 PM
Hey all!

I have a DataGrid set up and have the XML data nice and cozy inside of it, but I have a bit of a snag...

The data I'm importing comes from a few separate files but the DataGrid ends up displaying all of them, so the rows are a bit of a jumble initially.

Is there a way to tell the DataGrid, AFTER it has all of it's data, to sort itself out alphabetically based on it's first column?

Thanks!

cancerinform
12-09-2008, 10:19 AM
I don't understand what you mean. When you have xml then only one file should be the datafile.

erobertwald
12-09-2008, 12:11 PM
The original data file is over 1100 items long. Editing an XML file that big is a massive pain so I broke it down into smaller chunks for sanity's sake.

The XML works fine. I'm just trying to find out how to force the DataGrid to sort after it's populated.

When I click on the first column's header, it sorts exactly as I need. Now I need to have it do that automatically so the user doesn't have to.