How to add and edit record directly on the table widget Google AppMaker? - google-app-maker

I have something like this to enter staff details list. Above is the table list. User click button below the table to add new list record. Then fill in the list details on the form beneath it.
My question is how can I just allow user to enter/fill in the list details directly on the table itself. Not only that, also user able edit record whenever the user clicks the records and wanted to change them.

The example I am providing is specifically for a datasource in autosave mode, so you will need to make some adjustments since it appears that your datasource is in manualsave mode. First you will either want to recreate your table and in the table creator choose 'Editable' which will automatically place inputs in your table row vs labels. Alternatively you can just replace all your labels with Textboxes, Dropdowns, or whatever your input should be. See the image of the table creator below:
Since in my example I used a 'Insert Only' form I moved my 'Create Button' and my 'Clear Changes' button inside the formbody, then set the flow direction of the formbody to horizontal and then matched the spacing of the form fields to the same as my table row and dragged the formbody to be between the tableheader and the tablebody(list) element. See the image below:
Again you will want to make adjustments to fit your needs such as rearranging where your 'Save' and 'Reset' buttons appear and in manualsave mode you may be able to skip the formbody entirely since your 'Add Details' button should automatically create a new table row anyways which you will then be able to edit directly in the table, you may just need to find it first but generally new rows should just be added on the bottom of your current datasource page.

Related

Removing focus from first record in table widget?

I have a page with the table widget. One the page is open, first record in the table is in focus and highlighted. Is is possible to remove focus from the first record? I would like users to search for records before anything (from the table widget) is highlighted.
You cannot remove the default behavior of selecting the first row of the table when it gets loaded; However, if you pretend to only show data after the user starts searching for information, then you might as well not load any data. For that, you will need to uncheck the "Automatically load data" option form the datasource. See picture below:
Then, what you want to do is load data after the user searches for something.

TableView Enhancements

The TableView still leaves a lot to be desired. Does anyone have a more complex example of a TableView that you would like to share? Here's what I'm missing:
Insert and Delete row:
Possible solutions:
press TAB on the last cell and new row gets inserted automatically
right mouse button -> context menu -> insert line (or delete line)
a table footer with table navigation and insert/delete buttons (like MS Access)
keyboard shortcut
...
Insert and Delete should be either at the current row position or at the bottom of the table. Of course the new row should be highlighted.
Copying / Duplication of rows inside the TableView
Copy selected cells to the clipboard
(solution exists: copy multiple cells to clipboard, paste into table is missing)
Insert a row with default values
Type to Edit: I don't want to have to doubleclick on a cell first in order to edit it. When you type on a cell, the table should automatically go into edit mode.
Navigation options like e. g. TAB = cell in next column, ENTER = cell in next row
Filtering should be possible via components inside the tableview, not via components (TextField etc) outside of it. A filter indicator (like the sort indicator) would be nice.
Changing the visibility of columns should be convenient, not via multiple clicks of the tableview menu button (for every column you have to click the menu button separately to show the available columns). The tableview menu button should be customizable
(solutions exist with reflection and without reflection)
Row and column headers should be possible
Validation of cells, so that when you are in edit mode and enter text instead of digits into a numeric cell you get the option to cancel the edit mode and revert to the default value
A (fixed) table footer which could e. g. show the sum for each column would be nice
Freezing of columns (there's already a Jira task for this)
Some of these were covered partially years ago from what I've seen. But I couldn't get a clear How-To impression and maybe things have changed with JavaFX8.
In case someone likes to contribute to any of these mentioned features, please share your thoughts. Thank you very much.

Can we copy the value of one field to another in a repeating table of infopath form?

Hi guys can anyone tell me how to copy a field value in a repeating table to another field when we insert another row. It is just like amazon checkout process. In Amazon checkout process we have to click a check box when our billing address is same as our shipping address.
In this scenario am having one text box and drop down box fields in a repeating table. When am writing something in the text box and inserting another row. here come the problem I have inserted a value in the drop down box, when the value is selected in the drop down box the textbox value from the parent should be copied to the child node. This has to be done without any code behind.
Please help me regarding this issue
You could probably do this using the default value of the child node.
The default value can reference another field either on your main datasource or any secondary datasource.
I would assume that you don't want this updating when the user adds another child node. If that is the case then you will need to uncheck the "Update this value when the value of the foumlua is recalculated."

jqGrid ASP .Net Permanent 'Add new row'

I've been using jqGrid ASP .Net and really happy with it but I required a permanent blank new row at the top of the grid which allows a user to enter a new row on the fly rather than using the add row dialog.
From looking at the trirand forums, this is currently not supported 'out of the box'.
I have seen this forum post http://www.trirand.net/forum/default.aspx?g=posts&t=212 but it doesn't work (alert is shown but nothing else happens) and also requires the user to click the New button rather than the new row always being at the top of the grid.
Any help would be greatly appreciated,
Cheers
Additional Information:
I am wanting a permanent blank row at the top of the grid where the user enters every new row, below this row would be the data already entered (loaded from the database on page load). As the new row is added (when the user hits enter) the row is displayed in the grid (which I gather would also fire the OnRowAdding event for me to insert into the sql server) and the permanent new row would clear its values ready for new entry. I am also using inline editing (which is working fine) and committing the changes to a sql server database. I am populating the grid on load of the page by setting the datasource to a datatable and calling DataBind()
Look at this example which I created for the answer. The example works with local inline editing and fill the grid with empty data at the beginning. You can modify it and fill only in the first line empty data and all other rows fill with "real" data.
Another way: you can just place "New" button above the rows (see Add toolbar in the bottom of the header using jqgrid which describes how to do this) on the second navigation bar. So users will see it immediately. You can also place custom button instead of a standard "New" button. This custom button (for example "+") could just insert a new row and goes in the inline editing mode.
If all this is not what you want, you should include in your question more detailed information which kind of editing you use (inline, cell or form), where you hold the data (local, only on the server or use loadones:true to have a mix data holding).
Ended up solving this problem by inserting a new row to the datatable when I populate the grid as follows:
DataRow dr = dtTimesheets.NewRow();
dtTimesheets.Rows.InsertAt(dr, 0);
grdTimesheet.DataSource = dtTimesheets;
grdTimesheet.DataBind();
Then on the RowEditing method I check if it is the in fact the new row and perform my insert instead of an edit and then reload the grid which puts a new empty row at the top of the grid again.

Using the Tab key to navigate form inputs

I am having some problems with tabbing within my asp.net pages. This project was developed with Visual Studio 2008.
Case 1
I have two html tables. The first table has two rows; the second table has four rows. Within the cells are of each table are asp.net fields, text boxes and radio button lists. I set focus to the first field of table one. I then press the tab key multiple times. The focus moves through the field of table one and then through the fields in the first row of the table two. Then instead of goes to the second row of the table two it return to the table one.
But if I set focus to the last cell on the first row of table two, it tabs through the remaining cells of table two properly. Can you tell me how to get the tabbing to behave properly and go to the cells in there natural order? Note that I am setting the tab index property in the order that I want.
Case 2
On another page I have an html table with a single row followed by a gridview control. The gridview control is writeable and has the following columns: Check Box, Radio Button List, Text Box, Text Box, Text Box and a Check Box List. If I click on one of Check Box, Radio Button List or Check Box List., then press tab, the cursor pops out of the grid and sets focus on the first field of the table outside the grid. But if I set focus on one of the text boxes and tab; then the tab goes through the fields of the grid left to right one row at a time. This later behavior is what I want in both cases. I don’t know why my cursor pops out of the grid when I start with a field other than a text box.
Please help if you can.
Bob
funny, you explain in details your case but you didn't explain what it needs to be explained in order to someone can understand you :)
first of all, is table1 located in the first tab and table2 in second tab?
what do you used for tabs: asp.net tab control, jquery ui tabs...?
what do you mean by 'press the tab key multiple times'? same tab? do you have postback on tab click? what is the focus in your case, and so on and on...
cheers
Have you checked the order of the input elements in your HTML? Generally the tab order follows the order of controls.
If that all looks right, then make sure nothing is setting the TabIndex property - as this will also mess up the tab order.
I pretty much resolve this and I wanted to add the answer for anyone who viewed this thread. The problem was the autpostback on certain fields. Once I disabled autopostback, the problems went away.
Bob
You need to use Javascript and I referred for your a very good example of navigating through Gridview rows with Up/Down keys.
http://www.codeproject.com/Articles/25675/GridView-Rows-Navigation-Using-Arrow-Up-Down-Keys

Resources