I have a dataview webpart (of a sharepoint custom list), with 4 columns(I want the 4th column to appear first). How can I change the order of the columns in the dataview webpart?
Even easier in SharePoint Designer, select the Web Part and then in List View Tools Riboon -> Options Tab > Select Add/Remove Columns. You can add remove columns as well as change the position of columns.
Use the Common Tools pane to reorder the items, or cut the XSLT for the 4th column and paste it in as the first thing rendered. If you do it the later way, you'll have to adjust the TH values accordingly. If you do it through the common tools pane, it handles that for you automatically.