<script src="datoss.asp"></script>
<div id="domSelection" style="width:620px; height:300px"></div>
<script>
$(document).ready(function() {
$("#domSelection").kendoGrid({
dataSource: {
data: FuncionDellenado3()
},
selectable: "multiple",
pageable: true,
scrollable: true,
navigatable: true,
columns: [
{ field: "FirstName", title: "productos", format: "{0:c}", type:"String",editable: false, width: "150px" },
{ field: "City", title: "cantidad", editable:true, type:"Number", validation: { min: 1, required: true },width: "150px" },
{field: "BirthDate", title: "fecha de Entrega",type:"String",editable:true,width:"150px"},
{ field: "favoritos", title: "favoritos", editable:true, type:"String",width: "150px" },
{field: "boton", template: "#= '<form id=\"form3\" method=\"post\" action=\"activauno.asp\"><input type=\"submit\"id=\"boton3\" class=\"boton3\" value=\"3\"/></form>' #", title: "favorito", width: "100px",type:"String", editable:false },
{ field: "añadir", template: "#= '<input type=IMAGE SRC=\"add.gif\"\id=\"añadir\" value=\"CODE\" />' #", title: "añadir", width: "210px",type:"String", editable:false }],
editable: true
});
});
</script>
<script>
$(document).ready(function(){
$('.boton3').click(function() {
var x=document.getElementById("boton3").value;
var sourcegrid = $('#domSelection').data('kendoGrid');
sourcegrid.select().each(function () {
var dataItem = sourcegrid.dataItem($(this));
var column = dataItem.favoritos;
var nomb = dataItem.FirstName;
fi = document.getElementById('form3');
contenedor = document.createElement('div');
contenedor.id = 'div1';
fi.appendChild(contenedor);
ele = document.createElement('input');
ele.type = 'text';
ele.value = column;
ele.name = 'favo';
ele.id = 'campo';
contenedor.appendChild(ele);
ele = document.createElement('input');
ele.type = 'text';
ele.value = nomb;
ele.name = 'nomb';
ele.id = 'campo2';
contenedor.appendChild(ele);
});
});
});
</script>
and my code asp<% Dim clientes, nombre2, nombre, material nombre2 = Request("nomb")response.write(nombre2)nombre = Request("favo")response.write(nombre)nombre2=Replace(nombre2,"Ñ","?")%><div id="fix_width"> <div id="chart"></div></div>
I have a wrapper DIV with the following CSS properties:
height: auto !important;
margin: 0 auto -125px;
min-height: 100%;
Inside that DIV, I have two other DIVs. The first one is a menu aligned to the left side of the page with the following CSS properties:
float: left;
width: 160px;
To the right of the menu should appear the page content. It's another DIV. If I just type some content into it (some static text), all is well (i.e., it appears to the right of the menu and spans the rest of the screen). If, however, I allow the Kendo grid to populate it, it clobbers the menu, and either takes up the whole screen (if I don't use any CSS properties) and even extends below the menu (even though it contains only one row of data), or it appears as a tiny little area to the right of the menu, depending on what I set "display" as.
This DIV appears just fine in IE (i.e., it appears to the right of the menu and takes up the remainder of the screen space, regardless of browser width--the grid columns resize as I resize the browser). How do I get this to work in Chrome, too?

Hi,
I am trying to add a row to my grid but it isn't happening. I keep getting this error:
Uncaught ReferenceError: FirstName is not defined
(anonymous function)
Widget.extend._rowsHtmlkendo.web.js:18870
Widget.extend.refreshkendo.web.js:19055
e.extend.proxy.gjquery.min.js:2
Class.extend.triggerkendo.web.js:133
Observable.extend._processkendo.web.js:5628
Observable.extend._changekendo.web.js:5584
e.extend.proxy.gjquery.min.js:2
Class.extend.triggerkendo.web.js:133
Observable.extend.splicekendo.web.js:3920
Observable.extend.insertkendo.web.js:5394
Observable.extend.addkendo.web.js:5377
(anonymous function)1:367
f.Callbacks.njquery.min.js:2
f.Callbacks.o.fireWithjquery.min.js:2
e.extend.readyjquery.min.js:2
c.addEventListener.B
I've traced it down to this annonymous function - rowTemplate
(function(data) {
var o,e=kendo.htmlEncode;with(data){o='<tr data-uid="'+(uid)+'"><td>'+(e(FirstName))+'</td><td>'+(e(LastName))+'</td></tr>';}return o;
})
Here's my html file...Looks like a scoping issue? I can't figure out why this is happening???
<html>
<head>
<script src="http://localhost:8000/kendo/js/jquery.min.js"></script>
<script src="http://localhost:8000/kendo/js/kendo.web.min.js"></script>
<link href="http://localhost:8000/kendo/styles/kendo.common.min.css" rel="stylesheet" />
<link href="http://localhost:8000/kendo/styles/kendo.default.min.css" rel="stylesheet" />
</head>
<body>
<div id="grid"></div>
<script>
$(document).ready(function(){
$("#grid").kendoGrid({
columns:[
{
field: "FirstName",
title: "First Name"
},
{
field: "LastName",
title: "Last Name"
}],
dataSource: {
data: [
{
FirstName: "Joe",
LastName: "Smith"
},
{
FirstName: "Jane",
LastName: "Smith"
}]
}
});
var grid = $("#grid").data("kendoGrid");
grid.dataSource.add([{
FirstName: "Bobby",
LastName: "Loo"
}]);
});
</script>
</body>
</html>