i have insert 3 radbuttonelement in my radtoolstrip the click event is the same for all buttons and i want identify each button but i can't get their name
==> switch (((RadButtonElement)sender).Name)
why?
1 Answer, 1 is accepted
0
Nikolay
Telerik team
answered on 30 Nov 2007, 02:07 PM
Hello jojo,
RadButtonElement does not have a Name property in its API. The Name value you set is only for its instance name. Still, you can identify which button is clicked by comparing RadButtonElements in your Click event handler. Please refer to the following snippet:
RadButtonElement buttonClicked = sender as RadButtonElement;
if (button1 == buttonClicked)
{
// An action when the first button is clicked
}
if (button2 == buttonClicked)
{
// An action when the second button is clicked
}
Do not hesitate to contact us, if you have further questions.