This is a migrated thread and some comments may be shown as answers.

The below code isnt working!! please assist

1 Answer 71 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Dhananjay
Top achievements
Rank 1
Dhananjay asked on 04 Apr 2012, 01:15 PM
iam trying to insert the textbox data into listbox on button click but the foolowing code isn't adding data into listbox


$(document).ready(

function () {

$("#click").click(function () {

 var val = document.getElementById('textboxs').value;

 var View = $("#listView").data("kendoListView");

 View.add(val);

});

});






<

td style="width: 141px">

 <ul id="listView" />

 </td>

 </tr>

 <td>

 <input type="text" id="textboxs" name="textname" />

 <input type="button" id="click" value="Add" />

  </td>

 

1 Answer, 1 is accepted

Sort by
0
rlapao
Top achievements
Rank 1
answered on 27 Apr 2012, 07:09 PM
Hi,

I'm not an expert here but I would say that you are missing some steps in your code, for instance:
- Define the template that will be used to bind the items
- Set the datasource
- ..

See some samples with source code here: http://demos.kendoui.com/web/listview/index.html 
Tags
ListView
Asked by
Dhananjay
Top achievements
Rank 1
Answers by
rlapao
Top achievements
Rank 1
Share this question
or