main form contains RadCommandbar with button 'cmdNew' and other form contains RadCommandbar with button 'cmdNewR'.
Replaced button cmdNewR by cmdNew using the following function
Protected Sub ReplaceRadCommandBarButtonItem(ByVal ctlOriginal As CommandBarButton, ByVal ctlNew As CommandBarButton)
Dim owner As RadCommandBarItemsPanel = CType(ctlOriginal.Parent, RadCommandBarItemsPanel)
Dim originalIndex As Integer = owner.Children.IndexOf(ctlOriginal)
owner.Children.Remove(ctlOriginal)
owner.Children.Insert(originalIndex, ctlNew)
End Sub
The cmdNewR button in command bar will replaced by cmdNew. but click event is not hitting
Private Sub cmdNewR_Click(sender As Object, e As EventArgs) Handles cmdNewR.Click
NewFileClicked()
End Sub
Private Sub cmdNew_Click(sender As Object, e As EventArgs)
NewFileClicked()
End Sub