In my case, I want the user to pickup the values by clicking on a ">" type image at the end of the cell and a modal window is opened. Within the modal window a dynamic way to pass the value selected back to the cell.
You should look into this answer..instead of having custom button you can have an image button with each cell, in this answer he's adding a custom button in pager, but you can have a custom button with each cell like this.
Now after adding a image button, on click function you can get the value of the column using getCol and open a dialog using jQuery like this and then you can use setCol property of jqGrid to set the value of column.
Now try to write code using this approach. If you get any difficulty let us know.
Related
I am searching for a solution to how I can start an ag-grid table with only cell editors. That means I do not want to click into the row or cell to edit the data.
I have found almost a solution for me with this example in the doc:
Full row editing
This is exactly what I am searching for. I can programmatically start editing immediately. The problem with that example is that onCellValueChanged is only fired after the keyboard click "enter" or click on the next row.
I would need a solution where onCellValueChanged is fired immediately after a cell changed.
I can think of two ideas to accomplish this:
Use "No Click Editing"
This is similar to having all cells contain an input box. It just takes 1 click to focus.
https://www.ag-grid.com/javascript-grid-cell-editing/#no-click-editing
Custom cell renderer
Use a custom cell renderer to have input boxes in each cell. Then, you are always in edit mode. And you can control when the value is saved.
https://www.ag-grid.com/javascript-grid-cell-rendering-components/
i am trying to follow class Rendereing_a_cell_as_a_button
https://github.com/eclipse/nebula.widgets.nattable/blob/master/org.eclipse.nebula.widgets.nattable.examples/src/org/eclipse/nebula/widgets/nattable/examples/examples/_102_Configuration/Rendering_cells_as_a_link_and_button.java
from Nattable example to create similar button , i have copied same example code.
Button is showing on the desired column, but on click the style is not getting change of button like clicked and also listener is not getting called, it is going to edit mode and showing the content of cell.
Before Click
After click
If your table also supports editing you need to ensure that cells in the column that shows buttons should be not editable. This can be done by registering an IEditableRule#NEVER_EDITABLE for that column.
I have a aui form with Liferay.Autofields enabled.
The fields that I am duplicating with Autofield has a button and a textfield. The button click will trigger the datepicker and the selected value should be stored in the textfield.
And, when I click the "PLUS" button provided by Autofield, the fields are duplicated.
First, I need to know how I can bind the trigger event of all buttons to the datepicker. I know to do this for a single button. But since we are using autofield, I need to give the ID of the button with the index. Can anyone suggest how to bind the trigger event in my scenario
Second, once I click the date picker button, I should be able to get index of the Autofield row in which I have clicked, so that I can update my textfield
How can i display combo box like the one you see in the image (Birthday combobox) on this site:
http://www.edumobile.org/iphone/iphone-programming-tutorials/how-to-use-picker-in-iphone/
Is it UITextField or UIButton... How can i create such control?
I think it's a custom button with image that looks like combobox. pressing it opens probably a date picker. You need an image that looks like combobox and to customize your table cell appearance - add a button as accessory view or create a custom cell in IB
You are referring to the screenshot at the top of the article ?
To me it looks like the app is either a WebView or has manually created button image ... to my knowledge there is no native Combo buttons in the UIKit.
Sorry to share the bad news.
Good Luck
I am having very annoying issue. I have one form page with 5 custom cells. Each of them has one text field. On the bottom I have one button. In an onclick button function I am gathering values from each of the 5 described text fields.
My problem is that if my keyboard is up, I will get the values of not all but just visible text fields, the ones I don't see are null.
How to override this?
Thx,
Mladen
Separate data you have from your interface, that is store your textfield values in some other place right after you finish input. And access your data there.
UI elements are not intended to store data, but just to display it and allow input - as you can see in your case if you do not see a particular element you cannot be sure that it actually exists.
This might solve your problem..
1. Register your viewcontroller for KeboardNotifications
2.When keyboard will appear resize the view so that all fields will be visible.
3. When keboard will disappear just resize it back and continue..