Angular Xeditable - Restrict row editing to one row at a time - angularjs

I am using AngularJS XEditable control for Inline edits. I would like to restrict the user to edit one row at a time. i.e. the user should not able to edit some other row when one row is in edit mode. Is there a way to check whether any row is in edit mode?

You can do like this, assign different e-form value for different rows you want to edit and show that on click as shown in the below code.
<td ng-click="goalValueForm.$show()"><span editable-text="data.goalValue" e-name="goalValue" buttons="no"
e-form="goalValueForm"> </span></td>

Related

Widget column bug when the column is hidden

I have a problem with widgetcolumns. When I hide a column, the other widgets in the grid don't work properly. In my application, I need to dynamically hide and show a column of widgets while keeping the other widgets running
My fiddle: https://fiddle.sencha.com/#view/editor&fiddle/3dbk
Select value in tagfield. Press the 'Hide Num Column' button and try select a value in the Phone field. In the console you will see that when we hide a column, onWidgetAttach is run an infinite number of times
Any ideas how to do it right?
If you are using the widget column so you can edit cells I would suggest using
cell editing
or row editing
row editing

AgGrid loose edit mode when data is updated

I use AgGrid Enterprise, and allow users to edit an entire row so all cells switch to edit mode.
I also have an event listener to save the row in database when the user put the focus on a new line or outside the grid.
In the first column of my grid, i have a custom cell displaying a combo.
When the user select a value, it should update the cell AND 3 other cells in the row.
So i use the API to refresh the 3 cells.
Doing so put the cell in view mode, i loose the edit mode and the save event is triggered.
Is there a way in edit mode, to update cell content without loosing the edit mode ??
Thanks a lot.
You said your are try to entire row and and also have custom cell with combo
but ag-grid does not work any popup editor with full row edit.
You have to remove ag-grid property editType: 'fullRow' and it will work.
https://www.ag-grid.com/javascript-grid-cell-editing/#gsc.tab=0

smart-table row selection enable disable using script

I am working on on page where I need to show row selected and I need to populate that selected row in form next to that grid, its working properly but I am trying to implement disable row selection when user is editing any existing row, please let me know how to resolve this. thanks.
Assuming you have something similar to this in your code:
<tr st-select-row="schedule" st-select-mode="multiple" ng-repeat="schedule in displaySchedules>
You should remove the attribute st-select-row="schedule" to disable selection functionality when editing flag is true or whatever is the condition you need to meet.

add checkbox to subtab on a NetSuite form

This may be a simple quesiton but I need to ask to be sure I am in the correct direction. In the Item Fulfillment form for example, there is a first column Fulfill that is a checkbox. Above it there are buttons for Mark All and Unmark All as well. What I would like to do is have similar functionality on one of my other subtabs. I already have a custom child record that lives on my subtab and added a checkbox bool field to the record. I could get that to somewhat work but what I would like to know is
1- is that the correct approach.
2- does it need to be a field that is selected to be saved,
3- for their functionality this only appears in Edit mode. is that a limitation?
4- I notice their "checkbox field" is not as wide as the one I made
5- Is there a way that I would only get this "field" to appear in the record when it is in a sublist and not when it is in its own custom form to create a new item? I would only have it as a checkbox in a subtab.
Or is my approach wrong and perhaps there is an easier way to do it?
Thanks
1 - You can create a check box using inline HTML field - script the check box that way. Call a client script's function to handle the click.
2 - Not really sure what you're talking about - if you mean "Store Value" in the field definition, the answer is "No".
3 - Edit mode, yes. You can't change values of a field when not in edit mode.
4 - Width of a field can be controlled on the form design.
5 - Create 2 different forms. The data entry form would not include the check box, the sublist form would.

updating an ng-grid cell

I'm displaying an ng-grid and I would like to change a particular cell's content based on an update. I don't want to make the cell editable. I'm instead popping up a dialog when they click on a Row. When they submit the data, I update the db using ajax, but I don't want to refresh the page. I'd like to update the cell to say something like "Updated". I haven't found anything in documentation or examples that would allow me to modify a particular cell on the fly. Anybody wanna point me in a right direction?
I do something similar with my data. Use a row or cell template to show your dialog using ng-click and pass a reference to the row.entity to your dialog. Then you can just update the data on the row.
I created an example below where I have a cell template that has an event to capture the row, column, and cell data. Then I allow for the user to update the value, and on the button click I update the row with the new value.
Plunkr here:
http://plnkr.co/edit/JQ7mtD?p=preview

Resources