DxHtmlElementEventArgs.ElementId Property
Returns the unique identifier of an HTML element. Element IDs are set in HTML markup (the “id” property). See any “HtmlElementMouse~” event description for more information (for example, WinExplorerView.HtmlElementMouseClick).
Namespace: DevExpress.Utils.Html
Assembly: DevExpress.Data.Desktop.v22.1.dll
NuGet Packages: DevExpress.Data.Desktop, DevExpress.Win.Dashboard.Design, DevExpress.Win.Design
Declaration
Property Value
Type | Description |
---|---|
String | The unique identifier of an HTML element. |
Remarks
The code below illustrates how to identify elements and perform different actions for each.
<div class='buttonPanel'>
<img id="btnPhone" src="PhoneCall"/>
<img id="btnVideo" src="VideoCall"/>
<img id="btnText" src="Message"/>
</div>
htmlContentControl.ElementMouseClick += (s, e) => {
if(e.ElementId == "btnPhone")
// Action #1
if(e.ElementId == "btnVideo")
// Action #2
if(e.ElementId == "btnText")
// Action #3
};
See Also