Forum
Topic RSS
00:59
16/04/2009
OfflineHi,
I am working on Asp.net MVC application in which i am trying to use
jqGrid 3.4.2 - jQuery Grid
to display the data but after adding the code as shown below it is throwing the error as "jQuery("#list").jqGrid is not a function http://localhost/starfix/Logbook Line 116" when the page loads
<
asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
<link rel="stylesheet" type="text/css" href="<%=Url.Content("~/Content/webui/Scripts/themes/coffee/grid.css")%>" title="coffee" media="screen" />
<script src="<%=Url.Content("~/Content/webui/Scripts/jquery-1.3.2.js")%>" type="text/javascript"></script>
<script src="<%=Url.Content("~/Content/webui/Scripts/jquery.jqGrid.js")%>" type="text/javascript"></script>
<script src="<%=Url.Content("~/Content/webui/Scripts/js/jqModal.js")%>" type="text/javascript"></script>
<script src="<%=Url.Content("~/Content/webui/Scripts/js/jqDnR.js")%>" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(
function() {
jQuery(
"#list").jqGrid({
url:
'/Logbook/GridData/',
datatype:
'json',
mtype:
'GET',
colNames: [
'Id', 'Votes', 'Title'],
colModel: [
{ name:
'Id', index: 'Id', width: 40, align: 'left' },
{ name:
'Votes', index: 'Votes', width: 40, align: 'left' },
{ name:
'Title', index: 'Title', width: 400, align: 'left'}
],
pager: jQuery(
'#pager'),
rowNum: 10,
rowList: [5, 10, 20, 50],
sortname:
'Id',
sortorder:
"desc",
viewrecords:
true,
imgpath:
'/scripts/themes/coffee/images',
caption:
'My first grid'});
});
</script>
</
asp:Content>
<asp:Content ContentPlaceHolderID="body" runat="server">
<
h2>My Grid Data</h2>
<
table id="list" class="scroll" cellpadding="0" cellspacing="0"></table>
<
div id="pager" class="scroll" style="text-align:center;"></div>
</asp:Content>
i am quite new to jquery hence not able to find the reason for this error. Can anybody pls help me in this ?
02:16
Moderators
30/10/2007
OfflineHello,
Serch this form for this error. Mostly this is caused that the needed js files are not loaded. You will need to ajust the path in the loader. See docs.
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
05:42
Moderators
30/10/2007
OfflineHello,
In most cases the error "jQuery(”#list”).jqGrid is not a function"
means that the needed JS files are not loaded or you use a version of jqGrid that is not compatible with jquery 1.3.x
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
04:17
10/08/2009
OfflineYou should include i18n/grid.locale-en.js before laoding jquery.jqGrid.min.js. See /jqgridwiki/doku.php?id=wiki:first_grid#html_file
You should of cause download from http://www.trirand.com/blog/?page_id=6 and use current version of jqGrid.
18:02
Moderators
30/10/2007
OfflineHello,
And the last, but not the least, if you use the development version, please open the jqGrid loader and adjust the
pathtojsfiles
variable
http://www.trirand.com/jqgridw.....stallation
Please read it carefully.
If you use some old IE versions please change the following code in jqGridInclude function in the loader
FROM
if(jQuery.browser.safari)
TO
if(jQuery.browser.safari || jQuery.browser.msie )
Kind Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 994
Currently Online:
53 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66
Log In
Home