2013-03-21 4 views
0

내 codeigniter 웹 응용 프로그램에서 kendoui 격자를 사용했습니다.검도 그리드에 데이터가 표시되지 않습니까?

그리드가 표시되고 있지만 데이터가로드되어 있지 않습니다.

여기에 내가 한 일의 세부 사항이 있습니다.

나는이 쿼리를 사용하여 json 인코딩으로 파일에 echo했습니다. echo의 출력은 다음과 같습니다.

{"data":[{"Username":"admin","FirstName":"System","MiddleNames":"Default","LastName":"Administrator","City":"Sakhakot","Email":"[email protected]"},{"Username":"guest","FirstName":"System","MiddleNames":"Default","LastName":"Guest","City":"Peshawar","Email":"[email protected]"}]} 

위의 반향을 수행 한 데이터 파일의 위치. 은

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> 

그럼 이제 내가 어디 있는지 알아낼 수 있습니까?

켄드 위 전문 기술을 가진 사람이 누구입니까?

답변

1

당신이 쓴 : 그것이 있어야 할 때

read: { 
    read: ... 
} 

: 그런데

transport: { 
    read: ... 
} 

, 당신은 깨달았다 두 번 KendoUI를이 포함된다? 또한 처음으로 jendy를 포함시키지 않은 Kendo도 포함 시켰습니다. 나는 그것이 효과가 있다고 생각하지 않는다.

+0

많은 시간을 보내는 것에 감사 드린다. read에서 transport로 오류를 수정했고, 머리 부분의 맨 아래에서 두 번째 kendo.web.min.js도 제거했습니다. 그래도 데이터가 표시되지 않습니까? 무엇을할까요? 왜이 오류를주는거야? –

+0

그리드가 서식이 지정 되었습니까? 데이터가 나타나지 않습니다. – OnaBai

+0

실제로 제거해야하는 것은 JavaScript의 순서가 올바르지 않기 때문에 머리의 상위 4 줄입니다. – OnaBai

관련 문제