Hello Devexpress,
I want to get the element "name" from DevExpress.XtraBars.Navigation.ElementClickEventArgs
is it possible ??
thanks
Hello Devexpress,
I want to get the element "name" from DevExpress.XtraBars.Navigation.ElementClickEventArgs
is it possible ??
thanks
Hello,
The AccordionControlElement class doesn't have the Name property. This class is the Component descendant which, in turn, doesn't have this property either. We introduced the Name property for our BarItems and NavBarItems manually earlier. I asked our developers to introduce it for the AccordionControlElement class in the future.
Now, you can check an element either by the Text property as Alisher suggested or by an instance:
C#if (e.Element == accordionControlElement3)
I hope you find this information useful.
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hi Emad,
The task you are trying to accomplish is not entirely clear to me. As far as I understand, you are using AccordionControl and handling its ElementClick event. If you wish to execute your custom code only if an element named "name" has been clicked, modify the event handler in the following manner:
private void accordionControl1_ElementClick(object sender, DevExpress.XtraBars.Navigation.ElementClickEventArgs e) { if (e.Element.Text == "name") { //your code } }
If your task is more complex, please describe it in greater detail. I will do my best to provide you with an appropriate solution.
hello Alisher,
e.Element.Text return the text of the element but I need to get the name of the element ( in my case the name of the element is different from the text ) there is no property called e.Element.Name !!