I have a datagrid I will call Cancel

The three fields I need to sort in this datagrid are Column 0(Type) and Column 6 (Number) Column 7(ParentNumber).

The column 0 can have 4 different value
Parent
Child
Orphan
(Blank)
Column 7 have a infinite number of possibilities.

For items that have a Parent and Child in the datadrid I need to keep those grouped together with the Parent being first and the all the child records following

You know they should be grouped together because Column 6 and column 7 would equal each other.

Orphan specs would come next in the overal list being that Column 7 does not match the value of any of them items in column 6

and the next would be Blank items meaning

EX

0...................6 7
Parent 1
Parent 2
Child 20 1
Child 30 1
Child 40 1
Child 50 2
Child 60 2
Child 70 2
Orphan 100 5
Orphan 200 6
Orphan 300 7
(Blank) 1000




I would need the order to display in the datagrid
Parent 1
Child 20 1
Child 30 1
Child 40 1
Parent 2
Child 50 2
Child 60 2
Child 70 2
Orphan 100 5
Orphan 200 6
Orphan 300 7
(Blank) 1000