0

コード:

  @( Html.Telerik().ComboBox()
    .Name("cmbTest")
    .ClientEvents(events => events
                    .OnOpen("oncmbTestOpen")
                )
    )

   function oncmbTestOpen(e)
   {
        var index = 2;
        // How to give the shade(default orange color) to the list item of particular index(2) in the telerik mvc combo box
   }

コンボ ボックスを開くときに、telek mvc コンボ ボックスの特定のインデックス (2)のリスト項目に陰影 (デフォルトのオレンジ色) を与える方法。

4

1 に答える 1

0

次の方法で li 要素にアクセスできます。

function oncmbTestOpen(e){
  var index = 2;
  var $li = $(this).data('tComboBox').dropDown.$items.eq(index);
  //$li.css('color', 'red');
}
于 2012-11-21T21:39:55.300 に答える