how to access the value of input text was nested in ui-grid cell - angularjs

enter image description here
I made a cell template(ui-grid) which contains a label, a textfield, and a button. I bind a ng-click on the button. But I dont know how to access the value of textfield. Because what I want to implement is when user input value in the field and click save imagebutton and it will call ajax then do some update in web service.
I was wondering that is it possible to access the textfield from row entity, but I could not find the textfield property in the grid-cell.
thank you so much

ui-grid has built in row editor features. Try the link below.
http://brianhann.com/create-a-modal-row-editor-for-ui-grid-in-minutes/

Related

How can I detect click on the checkbox in header dataTable

I am using material-ui / data-grid
and I need to know when the user clicks on the selection of all the elements of the table, to be able to add or edit said selection function, or if there is a property that is activated when selecting the checkbox
enter image description here

ExtJs property grid - Selected rows editable?

I'm using a property grid with editors set in sourceConfig. I want only some rows to be editable and not all. Returning false in beforeedit disables all. The reason is, I have a button in a grid. When I click the button, the grid turns to a textfield! Any way to do this?
The beforeedit event should provide you with the editor and the editing context. Lets say your callback function looks like this:
function(editor,context) { ... }
Using the context you will get the record which get edited by accessing context.record while the editor can provide you with the editor form from where you have access to all rendered fields within that form. To get the form you have to get the editor first and after that you can fetch the form
var form = editor.getEditor().getForm()
This way you can be sure that the editor has been set up. To get a field within that form simply call
form.findField('fieldname') // fieldname is the dataIndex of the column
You can now do nearly anything based on your conditions.
In addition the record is also loaded into this form an can be accessed by calling form.getRecord()

create simple form with AngularJS+Bootstrap+grid

I am working on AngularJS and Bootstrap. I am new to both. I wanted to create one form which include firstname input textbox,lastname input textbox , city dropdown and add button called addUser.
When I click the add user button it should be saved in our database and then displayed in below grid with edit and delete button. When I click the edit button, all record comes under above corresponding textbox. I have gone through below link but i didn't get my scenario implementation, in that they used xeditable.
http://vitalets.github.io/angular-xeditable/
Here is an form example made with angular link
Basicly you need to create a controller. In your controller create a user object, bind this object properties to form contollers with ng-model. When user clicks a button send user object to a method in your controller, add ng-click to your buttons. In your functions, you can do create, edit, delete actions.
Please refer the link and check the highlighted keywords, this must cover all of your needs.

Change view of form on click of button or checkbox

I have to make a form codename-one in which i have a check box. if check box is checked then bellow it i want to display 2 combo box and if check box is unchecked then i want to display 2 text field.
How can i do it.
I have tried setVisible(true/false) but in it space consumed by label or text field is never covered up.
Please help.
You need to remove/add the components and then invoke either revalidate() or animateLayout(int) to refresh the UI.

Apex radio button check from controller

I have a scenario and i ma getting no where:
I am having 20 record and i m using pagination via standartcontroller and my page size is 1.
one by one record are displayed on the screen and i am having a list or radio button to select options.
When user select a radio button i am getting its value and fill a map with record,value for some processing.
What i want to do is that when a user hits back button the option he has selected in radio button must be visible there. But its not coz every time i m filling new values in the radiobutton list so old values are not sustained.
What i want is when user hits back button he should be able to see the old radio button selected.
How can i achive this:
1.Is there any way to make a radio button list's values be checked through controller.
2.Do I need to use wrapperclass to do this.
Help needed.! Thanks
It will be easier to put this field into object. If you don't have such field in you sObject than I would suggest to create wrapper class in your controller and display list of this wrappers instead of your native sObject.
If your radio button field is already part of the object, then there's no need for a wrapper class, but if the radio button doesn't need to be part of the object then use a wrapper class to keep the object simple.
Check out this example of a wrapper class with check boxes.
Wrapper classes don't have to be complex.

Resources