Can anyone please explain me in steps how can I expand or collapse a row in an ultragrid as shown in above example.
Take a look at the Expanded property of UltraGridRow. Below I included the link to the documentation. It has sample source code that shows how to do what you're asking.
http://help.infragistics.com/NetAdvantage/WinForms/2010.3/CLR2.0/?page=Infragistics2.Win.UltraWinGrid.v10.3~Infragistics.Win.UltraWinGrid.UltraGridRow~Expanded.html