DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit repbeiTemp1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit();
DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit repbeiTemp2 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit();

gridView.CustomRowCellEdit += (s, e) =>
{
	if (e.Column.FieldName == "col1")
	{
		if (e.CellValue == null)
		{
			e.RepositoryItem = null;
		}
		else
		{
			e.RepositoryItem = repbeiTemp1;
		}
	}
	else if (e.Column.FieldName == "col2")
	{
		if (e.CellValue == null)
		{
			e.RepositoryItem = null;
		}
		else
		{
			e.RepositoryItem = repbeiTemp2;
		}
	}
}

 

참조

: https://docs.devexpress.com/WindowsForms/DevExpress.XtraGrid.Views.Grid.GridView.CustomRowCellEdit

https://docs.devexpress.com/WindowsForms/DevExpress.XtraGrid.Views.Grid.GridView.CustomRowCellEditForEditing

/**
// KeyDown : 컨트롤에 포커스가 있을 때 키를 누르면 발생합니다.
//   - https://docs.microsoft.com/ko-kr/dotnet/api/system.windows.forms.control.keydown?view=net-5.0
// KeyPress : 컨트롤에 포커스가 있을 때 문자, 스페이스 또는 백스페이스 키를 누르면 발생합니다.
//   - https://docs.microsoft.com/ko-kr/dotnet/api/system.windows.forms.control.keypress?view=net-5.0
// KeyUp : 컨트롤에 포커스가 있을 때 키를 눌렀다 놓으면 발생합니다.
//   - https://docs.microsoft.com/ko-kr/dotnet/api/system.windows.forms.control.keyup?view=net-5.0
 */

//===========================================================

edtSampleControl.KeyDown += OnKeyDown_Enter; //엔터값 확인 
private void OnKeyDown_Enter(object sender, KeyEventArgs e)
{

	Console.WriteLine($"KeyDown code: {e.KeyCode}, value: {e.KeyValue}, modifiers: {e.Modifiers}" + "\r\n");
    
	if (e.KeyCode == Keys.Enter)
	{
		//엔터입력 처리
		e.Handled = true;
	}
}

//===========================================================

edtSampleControl.KeyPress += OnKeyPress_OnlyNumberic; //숫자, 백스페이스, 삭제만 허용
private void OnKeyPress_OnlyNumberic(object sender, KeyPressEventArgs e)
{
	Console.WriteLine($"KeyPress keychar: {e.KeyChar}" + "\r\n");

	//숫자, 백스페이스, 삭제만 허용
	char keyChar = e.KeyChar;
	if (!(char.IsDigit(keyChar) || e.KeyChar == Convert.ToChar(Keys.Back) || e.KeyChar == Convert.ToChar(Keys.Delete)))    //숫자와 백스페이스, 삭제를 제외한 나머지를 바로 처리
	{
		e.Handled = true;
	}
}

//===========================================================

edtSampleControl.KeyPress += OnKeyPress_EscapeToClear; //Escape(ESC) 입력시 Text지우기
private void OnKeyPress_OnlyNumberic(object sender, KeyPressEventArgs e)
{

	Console.WriteLine($"KeyPress keychar: {e.KeyChar}" + "\r\n");
    
	//Escape(ESC) 입력시 Text지우기
	if (e.KeyChar == Convert.ToChar(Keys.Escape))
	{
		Control cmp = sender as Control;
		if(cmp != null)
		{
			cmp.Text = null;
			e.Handled = true;
		}
	}
}

//===========================================================

edtSampleControl.KeyPress += OnKeyUp_Sample;
private void OnKeyUp_Sample(object sender, KeyEventArgs e)
{
	Console.WriteLine( $"KeyUp code: {e.KeyCode}, value: {e.KeyValue}, modifiers: {e.Modifiers}" + "\r\n");
}
출처 : https://github.com/driftyco/ionic/issues/2885



window.addEventListener('click', function(event) {
  if (Object.prototype.toString.call(event) == '[object PointerEvent]') {
    event.stopPropagation();
  }
}
, true);


또는


ionic.Platform.isIE = function () {
    return ionic.Platform.ua.toLowerCase().indexOf('trident') > -1;
}

if (ionic.Platform.isIE()) {
    angular.module('ionic')
      .factory('$ionicNgClick', ['$parse', '$timeout', function ($parse, $timeout) {
          return function (scope, element, clickExpr) {
              var clickHandler = angular.isFunction(clickExpr) ? clickExpr : $parse(clickExpr);

              element.on('click', function (event) {
                  scope.$apply(function () {
                      if (scope.clicktimer) return; // Second call
                      clickHandler(scope, { $event: (event) });
                      scope.clicktimer = $timeout(function () { delete scope.clicktimer; }, 1, false);
                  });
              });

              // Hack for iOS Safari's benefit. It goes searching for onclick handlers and is liable to click
              // something else nearby.
              element.onclick = function (event) { };
          };
      }]);
}


'Language > Mobile' 카테고리의 다른 글

[Hybrid/Ionic]Windows Platform에서 alert 객체 대체  (1) 2016.11.04

+ Recent posts