2010-02-03 3 views
0

편집 모드에서 울트라 웹 그리드 셀의 자동 완성 드롭 다운 컨트롤을 원한다면 사용자가 데이터를 입력 할 수 있도록 자동으로 값이 채워지므로 잘못된 데이터가 허용되어서는 안됩니다. 이것이 가능한가? 나는 webcombo를 사용하고 싶지 않다. 너무 무거워서 멀티 컬럼 드롭 다운이 필요 없다. 간단한 드롭 다운 목록이 필요하지만 사용자가 Google과 마찬가지로 입력 할 수있는 기능이 있지만 모든 키 스트로크에서 서버로 왕복하는 것이 아니라 클라이언트에 캐시 된 모든 값이 좋습니다.Infragistics ultrawebgrid 셀의 자동 완성 드롭 다운

제어는 다음과 같은 하나

http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ComboBox/ComboBox.aspx

감사처럼

RK

답변

0

내가 당신이 원하는 뭔가를 달성 할 수 있었다한다. 여기에 제가 한 일이 있습니다 만, Infragistics 패키지로 작동하는지 모르겠습니다.

1- JQuery UI 자동 완성 텍스트 상자를 다운로드했습니다. 2 사이트에 제공된 샘플을 약간 수정했습니다. 3 자동 완성을 위해 XYZ라는 클래스가있는 모든 드롭 다운을 수정하기 위해 무언가를 적용했습니다. 델리게이트를 사용 했으므로 UI에서 드롭 다운을 생성 할 때 자동 완성 텍스트 상자에 의해 자동으로 대체됩니다.

죄송합니다. 영어가 완벽하지 않으면 죄송합니다. 제 첫 번째 언어가 아닙니다. 여기

는 일부 코드 (참고 : 샘플에서 나는 라이브() 또는 대리인() 함수를 사용하지 않은)의

(function($) { 
    $.widget("ui.autoCompleteDDL", { 
     _create: function() { 
      var self = this; 
      var select = this.element.hide(); 
      var _isHoverUl = false; 

      var input = $("<input>") 
       .addClass("ig_Edit igtxt_Edit") 
       .width(select.width()) 
       .addClass(select.attr("class")) 
       .removeClass("AutoComplete DropDownList") 
       .click(function(e){this.select(); }) 
       .insertAfter(select) 
       .autocomplete({ 
        source: function(request, response) { 
         var matcher = new RegExp(request.term, "i"); 
         response(select.children("option").map(function() { 
          var text = $(this).text(); 
          if (!request.term || matcher.test(text)) 
           return { 
            id: $(this).val(), 
            label: text.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + request.term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>"), 
            value: text 
           }; 
         })); 
        }, 
        delay: 100, 
        select: function(e, ui) { 
         if (!ui.item) { 
          // remove invalid value, as it didn't match anything 
          $(this).val(""); 
          return false; 
         } 
         $(this).focus(); 
         select.val(ui.item.id); 

         self._trigger("selected", null, { 
          item: select.find("[value='" + ui.item.id + "']") 
         }); 

        }, 
        minLength: 1 
       }) 
       .blur(function(e){ 
         var curInput= $(this); 
         if (!_isHoverUl){ 
          setTimeout(function(){ 
           curInput.val(select.get(0).options[select.get(0).selectedIndex].text); 
           input.autocomplete("close"); 
          }, 150); // 150 is because of the autocomplete implementation. 
         } 
        }); 

      // Fix for the scrollbar in IE7/8 
      $("body") 
       .delegate(".ui-autocomplete", "mouseover", function(evt){ _isHoverUl = true;}) 
       .delegate(".ui-autocomplete", "mousemove", function(evt){input.focus();}) 
       .delegate(".ui-autocomplete", "mouseout", function(evt){_isHoverUl = false;}); 

      // Possibility of showing an arrow button. 
      $("<div>&nbsp;</div>") 
      .insertAfter(input) 
      .addClass("ui-icon-combo-arrow") 
      .mouseover(function(){$(this).toggleClass("ui-icon-combo-arrow ui-icon-combo-arrowH"); }) 
      .mouseout(function(){$(this).toggleClass("ui-icon-combo-arrow ui-icon-combo-arrowH"); }) 
      .removeClass("ui-corner-all") 
      .css({"display":"inline"}) 
      .position({ 
       my: "left center", 
       at: "right center", 
       of: input, 
       offset: "-1 0" 
      }) 
      .attr("title", "") 
      .click(function() { 
       // close if already visible 
       if (input.autocomplete("widget").is(":visible")) { 
        input.autocomplete("close"); 
        return; 
       } 
       // pass empty string as value to search for, displaying all results 
       input.autocomplete("search", ""); 
       input.focus(); 
      }); 

      input.val(select.get(0).options[select.get(0).selectedIndex].text); 
     } 
    }); 

})(jQuery); 

$(function() { 
    $("select.AutoComplete").autoCompleteDDL(); 
}); 

나는이

도움 희망