Comments (11)
Can you please describe more detail your issue?
from yii2-editable.
[ 'header' => DidmasterModule::t('didmaster', 'Service'), 'class' => EditableColumn::className(), 'attribute' => 'serviceName.serv_name', 'url' => '/didmaster/didtenant/get-services', 'type' => 'select', 'editableOptions' => function ($model) { return [ 'source' => ArrayHelper::map(ServiceMaster::getServicePackages(), 'serv_id', 'serv_name'), 'value' => $model->sv_id, ]; }, ],
Above is my code.
When I called 'get-services()' method and get complete operation with success, I need to reload my Grid.
from yii2-editable.
Ok, I check it later
from yii2-editable.
@igor-chepurnoi are you understand my problem?
from yii2-editable.
Yes, As I understand, you need to reload gridview after value has been saved, right?
After editable ajax request has been completed.
from yii2-editable.
@igor-chepurnoi Yes, I need to reload gridview after value has been saved. Please help me in it.
Thanking you.
from yii2-editable.
Ok, I'll try to help.
from yii2-editable.
I have updated this package, please update the package to dev-master
version, and use the following code for update your gridview
You need to define
clientOptions
array with success callback
Grid view example
<?php Pjax::begin(['timeout' => 10000, 'options' => ['id' => 'grid-pjax-container']]); ?>
<?php echo GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
[
'class' => EditableColumn::class,
'attribute' => 'username',
'url' => ['edit-user'],
'clientOptions' => [
'success' => (new \yii\web\JsExpression('function() {
$.pjax.reload({container: "#grid-pjax-container"}); // this code for update grid
}'))
],
],
[
'header' => Yii::t('app', 'Action'),
'class' => 'yii\grid\ActionColumn',
'template' => '{update} {delete}',
],
],
]);
?>
<?php Pjax::end(); ?>
from yii2-editable.
thanks @igor-chepurnoi,
i tried it but its giving following exception
Setting unknown property: yii2mod\editable\EditableColumn::clientOptions
from yii2-editable.
You need to update yii2mod/yii2-editable package via command composer update
, set version to dev-master
from yii2-editable.
Thanks @igor-chepurnoi .
from yii2-editable.
Related Issues (13)
- Multiple select option on grid inline edit. HOT 1
- Can't use related model as attribute HOT 1
- Doc: How make textarea for multi-line
- validate input value
- How can I get the key Id from the grid HOT 1
- How to change primary key name HOT 1
- Is it support 'File Input'? HOT 2
- how to set max length for EditableColumn? HOT 2
- vendor/bower/x-editable/dist/bootstrap3-editable not exist HOT 1
- url parameters
- how to make editable field readonly in gridcview
- How to add multiple attributes in email type HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yii2-editable.