kartik-v / yii2-grid

Enhanced GridView with various utilities for Yii Framework 2.0
http://demos.krajee.com/grid
Other
557 stars 302 forks source link

Unexpected token < in JSON at position 0 #1023

Closed manhunt2015 closed 2 years ago

manhunt2015 commented 2 years ago

hi I apologize for my poor English. my problem is with the editable column in gridview. I installed the required extensions through a tutorial video on YouTube, but when I use it, I only receive an error in position 0. I emphasize only in position 0. I did a lot of searching but the answers I found did not solve my problem. I thought to myself, it's better to look at the code output as well. When I took Inspect, I saw that no form can be created for position 0, it only has input. photo attached. https://s6.uupload.ir/files/p0_1deq.png https://s6.uupload.ir/files/p1_61q1.png Tell me if there is a solution to this problem so I can solve my problem. thanks

kartik-v commented 2 years ago

Read documentation about how to use EditableColumn and you can also use EditableColumnAction. For the use case you must use your GridView with dataProvider based on an ActiveDataProvider for the code mentioned to be successful.

Within Editable Column note the editableOptions which you can configure for your special scenario if needed by reading the Editable widget documentation.

If you want to understand how to setup an editable column - follow these web-tips

  1. Tip 1: Setup Editable Column to manipulate grid records
  2. Tip 2: Fast setting editable via EditableColumnAction