简体   繁体   English

kendoui网格未显示数据?

[英]kendoui grid is not showing data?

i have used kendoui grid in my codeigniter web application. 我在我的codeigniter Web应用程序中使用了kendoui网格。

The grid is showingup, but there no data loaded in that. 网格正在显示,但其中未加载任何数据。

Here is the details of what i have done. 这是我所做的详细信息。

i have used the query and did echoed it in file in json encode The output of echo is. 我已经使用了查询,并在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"}]}

the location of this data file in which i have done the above echo. 我在上面执行过上述回显的数据文件的位置。 is

http://localhost:12/projects/zorkif_nextgen/user_management/manage_users/list_view/

here is my view file in which i want to show the grid. 这是我要在其中显示网格的视图文件。

<?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>

This is my Head Section for of my application. 这是我应用程序的主要部分。

        <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>

So now i cant figure out where is it i am stuck??? 所以现在我不知道我在哪里卡住了???

anyone with Kendoui expertise?? 有Kendoui专业知识的人吗?

You wrote: 你写了:

read: {
    read: ...
}

when it should be: 什么时候应该是:

transport: {
    read: ...
}

By the way, did you realize that are including KendoUI twice? 顺便说一句,您是否意识到两次包含KendoUI? also, the first time that you include it you include Kendo not having include jQuery before. 同样,第一次包含它时,您会包含Kendo,而之前没有包含jQuery。 I don't think that that will work 我认为那不行

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM