Heartfelt condolences to the government and brotherly people of Bangladesh and the bereaved families," Foreign Office tweeted.
At least 26 people died after a Bangladesh ferry carrying around 50 passengers collided with a cargo vessel in the Shitalakhsya River south of the capital Dhaka.
"We had to fire teargas and rubber bullets to disperse them as they entered a police station and carried out extensive vandalism," Rafiqul Islam, the police official told Reuters, referring to protesters.
The protesters in Chittagong were from the Hefazat-e-Islam Bangladesh, an Islamist group opposed to the visit of Modi, who critics say has been pushing a Hindu-first agenda in India.
Mohammad Mithun took a good catch at leg slip as Bonner departed after hitting seven boundaries in his career-best knock, also his second 50 in as many innings.