BoldDesk®Customer service software with ticketing, live chat & omnichannel support, starting at $99/mo for unlimited agents. Try for free!
You have used wrong data binding for the Grid. Grid can bind only JSON data or table.
If you face any difficulties still, please let us know if you are using DIV element for Grid binding or want to bind any other data.
<script id="_table1" type="text/template"> //table data <thead> <tr> <th>Laptop</th> <th>Model</th> <th>Price</th> </tr> </thead> <tbody> <tr> <td>Dell Vostro</td> <td>2520</td> <td>638.56</td> <td>Windows 8</td> <td>4GB</td> <td>15.6</td> </tr> </tbody> </table> </script>
@(Html.EJ().Grid<object>("Grid") //table binding .Datasource(ds => { ds.Table("#_table1"); }) .Columns(col => { col.Field("Laptop").HeaderText("Laptop").Width(130).Add(); col.Field("Model").HeaderText("Model").Width(130).Add(); . . . . . }) ) |
We have created a sample and the same can be downloaded from the following location:
Please refer to the below documentation link for how we can use table binding in grid,
Please let us know if you have any queries.
Regards ,
Isuriya R
Regards,
Isuriya R