I have got a datatable which contains many columns in which three are main:
- hotelid
- dshotelid
- hotelname
Some hotels contain only dshotelid, some contains only hotelid and some contain both dshotelid and hotelid.
I need sort in such way so that those hotels who got both dshotelid and hotelid should be on top and then those hotels who have got only dshotelid and at last those hotels who have got only hotelid…
Please help me to create such a sort expression.
I created this :
dtmaintable.DefaultView.Sort = "dshotelid, hotelid"
but it Is not giving me desired output.
i got the answer its :