kendo-ui-grid


Weird error when trying to call function from button in Kendo UI grid


I want to call a method when the user clicks on one of the arrows in my grid. For some reason I am getting a very bizarre error whenever I click the arrow.
"Uncaught Error: Syntax error, unrecognized expression: a.k-grid-&nbsp"
I have no idea why I am getting this?
UPDATE: Because the error mentioned &nbsp I wondered if it had to do with the text being "&nbsp". Sure enough I took that out and it worked. I replaced it with a space, and all works now.
<!DOCTYPE html>
<html>
<head>
<body>
<div id='main'></div>
<script>
.k-grid tbody tr { height:8px; } .k-grid-content > table > tbody > tr { background:rgba(186,206,230,.8); border:1px solid white;
color:#494949; } .k-grid-content>table>tbody>.k-alt { background:rgba(218,230,242,.8); filter:Alpha(opacity=50); /* IE8 and earlier */ }
.k-button .fa { font-size: inherit; line-height: inherit; width: auto; height: auto; margin-left: 0; }
</script>
<script>
#gridIDNoScroll .k-grid-header{ padding: 0 !important; } #gridIDNoScroll .k-grid-content{ overflow-y: visible; } .k-grid .k-header { display:
none; }
.k-grid tbody .k-button, .k-ie8 .k-grid tbody button.k-button {
padding: 0px 0px 0px 10px;
min-width: 20px;
}
</script>
<script>
$(document).ready(function() {
if (typeof jQuery != 'undefined') {
// jQuery is loaded => print the version
alert(jQuery.fn.jquery);
}
//Set URL of Rest Service
var loc = (location.href);
var url = loc.substring(0,loc.lastIndexOf("/")) + "/xpRest.xsp/xpRest1";
//Move Up
//myRPCService.myMethod().addCallback(function (response) {
//alert('response: ' + response);
var dataSource = new kendo.data.DataSource({
transport: {
read: {
url: url,
type: 'GET'
},batch: false
}});
dataSource.read();
$("#gridIDNoScroll").kendoGrid({
dataSource: dataSource,
pageSize: 15,
noRecords: true,
selectable : true,
columns : [{
field : "name"
},{
field : "strDate",
width : 150
},{
field : "$10",
width : 150
},{
command:[
{
text: "&nbsp",
click: moveDown,
imageClass: "k-icon k-i-arrow-s",
icon: "k-icon k-i-arrow-s",
title: "Up"
},
{
text: "&nbsp",
//click: moveUp,
imageClass: "k-icon k-i-arrow-n",
icon: "k-icon k-i-arrow-n"
}
],
width:"90px"
},
]
});
//Move Down
function moveDown(e){
//e.preventDefault();
//var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
//alert("d");
}
});
]]
</script>
<div class="container-fluid">
<div
class="row"
style="margin-top:0xp !important"
id="gridIDNoScroll">
</div>
</div>
</body>
</html>

Related Links

How send page number in KendoUI Filter in server side
ToolBar kendo UI error
kendo grid Uncaught TypeError: Cannot read property 'slice' of undefined
Weird error when trying to call function from button in Kendo UI grid
Kendo UI grid pagination issue
kendo Grid - Sub column values got wrongly mapped when reordering the Column

Categories

HOME
sendgrid
image
proxy
heroku
dictionary
iterator
setup-deployment
microservices
youtube-api-v3
cross-browser
qore
wheelnav.js
modelica
collectd
leiningen
designer
caml
libtiff
apache-metamodel
reactcsstransitiongroup
text-rendering
google-cloud-speech
immutable.js
orleans
language-agnostic
php-openssl
sparse-matrix
spark-jobserver
wpfdatagrid
react-css-modules
xacml
replaceall
microsoft-chart-controls
bcd
nameservers
titanium-mobile
contact-form
scorm2004
form-data
normal-distribution
fusionpbx
revolution-slider
swift3.0.2
libvpx
cookiecutter-django
gzipstream
ncalc
g-code
firebase-admin
eigenvalue
nxlog
turbogears
node-sass
jquery-validate
python-c-api
magma
knpmenubundle
memory-alignment
query-performance
smart-table
yt-project
parallel-data-warehouse
spring-android
infix-notation
trash
thrust
player
persist
skype4py
captivenetwork
icu4j
tmuxinator
wyam
0xdbe
service-accounts
composite
unity5.2.3
device-orientation
python-green
fscommand
google-style-guide
fpml
id3v2
preferences
dml
jubula
srs
farseer
quantlib-swig
bulkloader
mylyn
lcs
cassini-dev
mt
dbproviderfactories
netbeans-6.9
pendrive
assembly-loading
vdsp
genshi
xmlspy
tomcat-valve
celltable
pyinotify
simpletest
text-coloring
thread-local-storage
post-build
msdev
multiple-languages

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App