The prosecution wanted to present as evidence a series of emails between Dewani and an unnamed man in 2009 in which he is said to have discussed his sexuality, but the defence objected.
Dewani's sexuality is a key element of the state's case that the 34-year-old hired hitmen to execute his wife Anni, 28, in 2010 because he was
a gay man who felt trapped into marriage by family pressures.
Asked by Western Cape High Court Judge Jeannette Traverso why the emails were relevant, prosecutor Adrian Mopp said they showed Dewani was "conflicted about whether to get married or whether to come out" as gay.
The defence argued that the e-mails provided graphic details about sexual preferences and what the men wished to do to each other, with just two or three references to the conflict over marriage, and were prejudicial to Dewani.
The judge ruled the emails, which had been retrieved by English cybercrime unit official Mark Roberts from a computer hard drive, were inadmissible as evidence.
Dewani has admitted being a member of gay websites and having paid male prostitutes for sex, but says he is bisexual and loved Anni.
The court heard on Monday, however, that the businessman described himself on the Gaydar website as "gay," not "bisexual," and that he had logged onto the site within hours of Anni's death.
Dewani says he and Anni were hijacked while in a taxi by armed men who forced him out of the vehicle at gunpoint before driving off with Anni and
later shooting her.
The taxi driver and two other men, who are serving sentences of between 18 years and life for Anni's murder, have said Dewani arranged for them to stage a fake hijacking and kill his wife.
The trial was adjourned until Monday next week because one of the prosecution team is ill.