我在我的codeigniter网络应用程序中使用了kendoui网格。
网格正在显示,但没有加载数据。
以下是我所做的细节。
我已经使用了查询,并在json编码中的文件中回显了它 echo的输出是。
{"data":[{"Username":"admin","FirstName":"System","MiddleNames":"Default","LastName":"Administrator","City":"Sakhakot","Email":"kifayat@zorkif.com"},{"Username":"guest","FirstName":"System","MiddleNames":"Default","LastName":"Guest","City":"Peshawar","Email":"kifayat@zorkif.com"}]}
我已完成上述回声的数据文件的位置。是
http://localhost:12/projects/zorkif_nextgen/user_management/manage_users/list_view/
这是我想要显示网格的视图文件。
<?php
/**
* Created by JetBrains PhpStorm.
* User: Kill3rCoder-Lapi
* Date: 3/21/13
* Time: 10:58 AM
* To change this template use File | Settings | File Templates.
*/
?>
<div id="grid"></div>
<script>
$(function(){
$("#grid").kendoGrid({
dataSource:{
read: {
read: "<?php echo base_url() ?>/index.php/user_management/manage_users/list_view/"
},
schema:{
data: "data"
}
},
columns: [
{ field: "Username",
title:"Username"
},
{ field: "FirstName",
title:"First Name"
},
{field:"MiddleNames"},
{field:"LastName"},
{field:"City"},
{field:"Email"}
]
});
});
</script>
这是我申请的主管部分。
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta charset="utf-8">
<title>Zorkif Business One Next Generation</title>
<link href="<?php echo base_url('kendo_ui/styles/kendo.common.min.css'); ?>" rel="stylesheet">
<link href="<?php echo base_url('kendo_ui/styles/kendo.default.min.css'); ?>" rel="stylesheet">
<script src="<?php echo base_url('kendo_ui/js/kendo.web.min.js'); ?>"></script>
<script src="<?php echo base_url('kendo_ui/js/kendo.grid.min.js'); ?>"></script>
<link href="<?php echo base_url('styles/zorkif_fluid_main.css'); ?>" rel="stylesheet" type="text/css">
<!-- Designed By Zorkif.com Team -->
<link href="<?php echo base_url('styles/messages.css'); ?>" rel="stylesheet" type="text/css">
<!-- The main message boxes appearing on the top of the page -->
<link href="<?php echo base_url('styles/header.css'); ?>" rel="stylesheet" type="text/css">
<!-- To style the header of the page -->
<link href="<?php echo base_url('styles/tab_bar.css'); ?>" rel="stylesheet" type="text/css">
<!-- To style the Tabs Menu and the Title Section of the page -->
<link href="<?php echo base_url('styles/action_buttons.css'); ?>" rel="stylesheet" type="text/css">
<!-- To style the action buttons and search box of the page -->
<link href="<?php echo base_url('styles/footer.css'); ?>" rel="stylesheet" type="text/css">
<!-- To style the header of the page -->
<link href="<?php echo base_url('styles/zorkif_slider.css'); ?>" rel="stylesheet" type="text/css">
<!-- To style the header of the page -->
<link href="<?php echo base_url('styles/login_form.css'); ?>" rel="stylesheet" type="text/css">
<!-- To style the header of the page -->
<link href="<?php echo base_url('styles/forms.css'); ?>" rel="stylesheet" type="text/css">
<!-- To style the form elements in the page -->
<link href="<?php echo base_url('styles/tables.css'); ?>" rel="stylesheet" type="text/css">
<!-- To style the default tables and data view and data entry tables in page -->
<link href="<?php echo base_url('styles/tiles_cpanel.css'); ?>" rel="stylesheet" type="text/css">
<!-- To style the information Tiles tabs for the cpanel -->
<link href="<?php echo base_url('styles/page_columns.css'); ?>" rel="stylesheet" type="text/css">
<!-- The file is used to privide column based division of the page design -->
<script src="<?php echo base_url('scripts/jquery-1.8.3.min.js'); ?>" type="text/javascript"></script>
<!--<script type="text/javascript" src="<?php /*base_url('scripts/cssrefreshNONE.js'); */?>"></script><!-- for Develoment Perpose Only and must be removed in the production version -->
-->
<!-- Start of Accordion Menu -->
<link href="<?php echo base_url('scripts/horz_accordion_menu/accordion_menu.css'); ?>" rel="stylesheet" type="text/css">
<script src="<?php echo base_url('scripts/horz_accordion_menu/accordion_menu.js'); ?>" type="text/javascript"></script>
<!-- End of Accordion Menu -->
<!-- Nivo Image Slider -->
<link rel="stylesheet" href="<?php echo base_url('scripts/nivo-slider/themes/default/default.css'); ?>" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php echo base_url('scripts/nivo-slider/nivo-slider.css'); ?>" type="text/css" media="screen" />
<!-- End of Image Slider -->
<link rel="shortcut icon" href="<?php echo base_url('favicon.ico'); ?>" />
<!-- Kendo UI Start -->
<!-- Kendo UI Web styles -->
<link href="<?php echo base_url('kendo_ui/styles/kendo.common.min.css'); ?>" type="text/css" />
<link href="<?php echo base_url('kendo_ui/styles/kendo.default.min.css'); ?>" type="text/css" />
<!-- Kendo UI Web scripts -->
<script src="<?php echo base_url('kendo_ui/js/jquery.min.js'); ?>" type="text/javascript"></script>
<script src="<?php echo base_url('kendo_ui/js/kendo.web.min.js'); ?>" type="text/javascript"></script>
</head>
所以现在我无法弄清楚我被困在哪里???
任何拥有Kendoui专业知识的人?
答案 0 :(得分:1)
您写道:
read: {
read: ...
}
应该是:
transport: {
read: ...
}
顺便问一下,你是否意识到两次包括KendoUI?另外,第一次包含它你包括剑道之前没有包含jQuery。我不认为那会起作用