not able to display fetch value from database in devextreme dxDataGrid

user6885473

i am new to devextreme dxDataGrid i am fetching value form database using json my var objdata storing data in json string format and i am passing var objdata as datasource in dxDataGrid but i am getting bad request error in dxDataGrid below is image of json string in my var objdata any help will be appreciated

picture

   $(document).ready(function() {
     fetchrecord();
   });

   function fetchrecord() { // calling fetch function
     $.ajax({
       type: "POST",
       url: "Default.aspx/fetchemp",
       data: '{}',
       contentType: "application/json;charset=utf-8",
       dataType: "json",
       success: OnSuccess,
       error: OnErrorCall
     });

     function OnSuccess(response) {
       var objdata = (response.d); // storing data in json string format
       $("#gridContainer").dxDataGrid({
         allowColumnReordering: true,
         allowColumnResizing: true,
         columnChooser: {
           enabled: true
         },
         columnFixing: {
           enabled: true
         },
         filterRow: {
           visible: true,
           applyFilter: "auto"
         },
         searchPanel: {
           visible: true,
           width: 240,
           placeholder: "Search..."
         },
         dataSource: objdata,
         columns: ["ID", "Name", "Gender", "Pincode", "City"]

       });



     }

     function OnErrorCall(response) {
       alert("error occur");
     }


   }
<div class="demo-container">
  <div id="gridContainer"></div>
</div>

Girl_engineer

The data that comes with the names on your side are not the same because you have made a typing mistake.

You have to do it this way.

columns:["Id", "name", "gender", "pincode", "City"]

or

     columns: [
     { dataField:'Id',    caption: 'ID'},
     { dataField:'name',   caption: 'Name'},
     { dataField:'gender',caption: 'Gender'},
     { dataField:'pincode',caption: 'Pincode'},
     { dataField:'City'}],

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

DevExtreme and DxMap and DxDataGrid

From Dev

dd function not able to fetch content from database

From Dev

Not able to fetch records by Date from database

From Dev

Lookup column display different value depend on value from another column in the same row inside dxdatagrid (Dev Extreme)

From Dev

Not able to fetch correct value from array

From Dev

Not able to fetch the value of a key from JSON data

From Dev

Not able to display value after selecting from dropdown

From Dev

Fetch and display data from database in AngularJs

From Dev

Fetch and display data from database in AngularJs

From Dev

How to fetch and display the data from the database?

From Dev

How to fetch a data from the database and display it on ListView?

From Dev

Fetch data from database and display to table

From Dev

Not able to add value into database from dropdown list

From Dev

How can I fetch a value from my database and display it across pages using cookies or similar?

From Dev

cannot able to fetch Boolean value from the shared Preference

From Dev

fetch data from database and display the values in database in laravel

From Dev

fetch value from database on selection of <option> in jsp

From Dev

PHP - Not able display images which src comes from database

From Dev

Not being able to display Image from MySQL Database in PHP

From Dev

Display value from database in a form value fields

From Dev

Not able to fetch the values from checkboxes

From Dev

How to fetch the dropdown values from database and display in jsp

From Dev

Fetch single record from database and display in text box using Codeigniter

From Dev

How to fetch data from MYSQL database and display it on the application?

From Dev

Fetch data from database in JSON using AngularJS and display it to the textbox

From Dev

java simple json fetch data from database and display

From Dev

Fetch PDF file from database and display it on Windows form C#

From Dev

Not able to update registration ID automatically using last value from database

From Dev

Not able to display value with JSTL tag

Related Related

  1. 1

    DevExtreme and DxMap and DxDataGrid

  2. 2

    dd function not able to fetch content from database

  3. 3

    Not able to fetch records by Date from database

  4. 4

    Lookup column display different value depend on value from another column in the same row inside dxdatagrid (Dev Extreme)

  5. 5

    Not able to fetch correct value from array

  6. 6

    Not able to fetch the value of a key from JSON data

  7. 7

    Not able to display value after selecting from dropdown

  8. 8

    Fetch and display data from database in AngularJs

  9. 9

    Fetch and display data from database in AngularJs

  10. 10

    How to fetch and display the data from the database?

  11. 11

    How to fetch a data from the database and display it on ListView?

  12. 12

    Fetch data from database and display to table

  13. 13

    Not able to add value into database from dropdown list

  14. 14

    How can I fetch a value from my database and display it across pages using cookies or similar?

  15. 15

    cannot able to fetch Boolean value from the shared Preference

  16. 16

    fetch data from database and display the values in database in laravel

  17. 17

    fetch value from database on selection of <option> in jsp

  18. 18

    PHP - Not able display images which src comes from database

  19. 19

    Not being able to display Image from MySQL Database in PHP

  20. 20

    Display value from database in a form value fields

  21. 21

    Not able to fetch the values from checkboxes

  22. 22

    How to fetch the dropdown values from database and display in jsp

  23. 23

    Fetch single record from database and display in text box using Codeigniter

  24. 24

    How to fetch data from MYSQL database and display it on the application?

  25. 25

    Fetch data from database in JSON using AngularJS and display it to the textbox

  26. 26

    java simple json fetch data from database and display

  27. 27

    Fetch PDF file from database and display it on Windows form C#

  28. 28

    Not able to update registration ID automatically using last value from database

  29. 29

    Not able to display value with JSTL tag

HotTag

Archive