Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Yii X-Editable Not Working Inside Dynamically Updated Cgridview #103

Open
yiicandyman opened this issue Apr 18, 2014 · 7 comments
Open

Yii X-Editable Not Working Inside Dynamically Updated Cgridview #103

yiicandyman opened this issue Apr 18, 2014 · 7 comments
Assignees

Comments

@yiicandyman
Copy link

I am using x-editable to use inline editing in CGridview.
http://x-editable.demopage.ru/index.php
I am using postgresql as the database. Initially the CGridview is empty. I am using CHtml:ajaxSubmitButton as forward and backward browse buttons for the CGridview. So on click of the button I am updating the CGridview.
But when the content is loaded inside CGridview, x-editable is not working. The anchor tag has only one attribute "rel". The attribute "data-pk" is not there, and if I click the link it is not becoming textfield.

Please help.

@Julian-B90
Copy link
Collaborator

How do you load the content from the inside CGridView.
Have you an example (Url etc)?

@yiicandyman
Copy link
Author

I am updating the CGridview using
$('#purchase-grid').yiiGridView('update', {data: {'PurchaseMaster[voucher_no]': $('#".CHtml::activeId($model,'voucher_no')."').val()}});

After ajax loading of CGridview x-editable is not working.

@yiicandyman
Copy link
Author

The script is not getting loaded since the grid is initially empty. How can I make the script to get initially loaded?

@Julian-B90
Copy link
Collaborator

Mhh maybe you can use the afterAjaxUpdate from the CGridView.
http://www.yiiframework.com/doc/api/1.1/CGridView#afterAjaxUpdate-detail

@alexiscps
Copy link

Any solution on this?

@dadinugroho
Copy link

Hi Julian, What should I added on the afterAjaxUpdate?

@sindhavsumit
Copy link

sindhavsumit commented Jan 18, 2019

i have same issue but any solution for this?

please help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants