かたがた・がてら・かたわら: the difference
Partly for
婚約の報告かたがた、お父様とお母様に会いに行きます。
I'm going to see her father and mother, partly to tell them about our engagement.
On the occasion of, While … as well, While …
「帰りがてら手紙出してくるね。」
I'll post the letter on my way home as well.
While, Besides, In addition to
本業の傍らバイトなどの副業をしている人は多い。
Many people do side jobs such as part-time work besides their main job.
How to tell them apart
「〜かたがた」: the most elegant; for formal business and courtesy visits (thanks or greetings plus a visit).
「〜がてら」: everyday speech; doing something along the way during a walk, shopping, etc., e.g. 「散歩がてらパンを買いに行く」.
「〜ついでに」: casual; clear main and side matter, a small thing done in passing; not for a formal visit to a superior.
「〜かたわら」: doing a main and a side occupation over a long time, e.g. running a company while writing.