Singh, who was elected to the post two days ago, had come for a visit to the Civil Court when she was attacked around 2.30 pm.
"Sharma is currently undergoing treatment at a hospital and is in a critical condition," he said.
He said the pistol used by the lawyer is a licensed weapon and the police have taken possession of it.
Singh had come on her first visit to the Civil Court after her election, he said quoting eyewitnesses.
At the ceremony in her honour, Sharma suddenly got up and opened fire on her, police said. Before anyone could react, he shot himself too.
Singh's body has been sent for a post mortem.