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.v24.1.dll
NuGet Packages: DevExpress.Data.Desktop, DevExpress.ExpressApp.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