clevertech / YiiBooster

YiiBooster
BSD 2-Clause "Simplified" License
544 stars 305 forks source link

X-Editable wont work if grid is empty. #918

Open alexiscps opened 10 years ago

alexiscps commented 10 years ago

I have a grid (TbExtendedGridView or CGridView, tried with both). When the grid displays record already there, adding a new x-editable record function correctly. After insertion, and grid update, the record appears normally with "Empty Text" etc.

When the grid has no records on it, the exact same operation inserts a record, refreshes the grid, but only the id appears (not x-editable). Any other x-editable field appears empty and of course non-editable.

It seems that x-editable is not loading if it find a empty grid to begin with. This appears only if the grid has no previous records. If there is one record ore more, everything works fine.

Cause of this, it is impossible to use x-editable grids to insert new record to an empty table.

Any ideas? I found that i'm not the only one with this problem.

Julian-B90 commented 9 years ago

maybe this can help you. http://x-editable.demopage.ru/index.php?r=site/components#EditableSaver and this http://vitalets.github.io/x-editable/docs.html#newrecord