private void xrLabel1_HtmlItemCreated(object sender, HtmlEventArgs e) { DXHtmlTableCell currentCell = (DXHtmlTableCell)e.ContentCell; DXHtmlAnchor link = new DXHtmlAnchor(); link.HRef = ((XRLabel)sender).NavigateUrl; link.InnerText = e.Brick.Text; currentCell.Controls.Clear(); currentCell.Controls.Add(link); currentCell.Attributes.Remove("onmousedown"); currentCell.Attributes.CssStyle.Remove("cursor"); }
private void xrLabel1_HtmlItemCreated(object sender, HtmlEventArgs e) { // Clear content of the currently processed item. e.ContentCell.Controls.Clear(); // Create a check box. DXHtmlGenericControl checkBox1 = new DXHtmlGenericControl(DXHtmlTextWriterTag.Input); checkBox1.Attributes["checked"] = "true"; checkBox1.Attributes["type"] = "CheckBox"; // Create a hyperlink. DXHtmlAnchor hypLink = new DXHtmlAnchor(); hypLink.InnerText = "XtraReports Web Page"; hypLink.HRef = "https://www.devexpress.com/Subscriptions/Reporting/"; // Add the created elements to the item's content. e.ContentCell.Controls.Add(checkBox1); e.ContentCell.Controls.Add(hypLink); }