■ UltraGrid 클래스의 셀에서 하이퍼링크 클릭시 처리하는 방법을 보여준다.
▶ 예제 코드 (C#)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
using System; using System.Diagnostics; using Infragistics.Win.FormattedLinkLabel; using Infragistics.Win.UltraWinGrid; #region UltraGrid 클릭시 처리하기 - ultraGrid_Click(sender, e) /// <summary> /// UltraGrid 클릭시 처리하기 /// </summary> /// <param name="sender">이벤트 발생자</param> /// <param name="e">이벤트 인자</param> private void ultraGrid_Click(object sender, EventArgs e) { UltraGrid ultraGrid = sender as UltraGrid; UIElement uiElement = ultraGrid.DisplayLayout.UIElement.ElementFromPoint(ultraGrid.PointToClient(Form.MousePosition)); if(null == uiElement) { return; } if(uiElement is TextSectionUIElement) { UltraGridCell c = uiElement.GetContext(typeof(UltraGridCell)) as UltraGridCell; if(null == c) { return; } Process.Start(string.Format("http://www.google.com/search?hl=en&q={0}&aq=f&oq=", c.Value.ToString())); } } #endregion |