3
#:CustomerVersion# #:Rank# #:AccountType#

デフォルトでは、ページのロード時に最初のリスト項目が選択されます。これを達成する方法は?

ここに画像の説明を入力

<script type="text/x-kendo-tmpl" id="template">
  <div class="product">
    <h3>#:CustomerVersion#</h3>
    <h5>#:Rank#</h5>
    <h3>#:AccountType#</h3>
  </div>
</script>


<div class="demo-section">
  @Code Dim listName = "List" Dim listViewRankBar = Html.Kendo().ListView(Of RankBarModel)() With listViewRankBar .Name(listName) .TagName("div") .ClientTemplateId("template") .DataSource(Sub(datasource) datasource.Read(Sub(read) read.Action("Products_Read",
  "RankBar")) datasource.PageSize(15) End Sub) .Selectable(Sub(selectable) selectable.Enabled(True) selectable.Mode(ListViewSelectionMode.Single) End Sub) .Events(Sub(events) events.Change("onChange").DataBound("onDataBound") End Sub) '.Pageable() End
  With End Code @listViewRankBar
</div>

4

1 に答える 1

1

 function listRankBarOnDataBound(arg) {
   //Fires when the list view has received data from the data source and it is already rendered.
   // get a reference to the list view widget
   var listView = $("#ListRankBar").data("kendoListView");
   // selects first list view item
   listView.select(listView.element.children().first());
 }

于 2015-04-13T13:13:04.807 に答える