When adding a new row to an Antd table, make it the first row visible? - reactjs

Just started using Ant, have been loving it so far. I have a working ant table and add row button, however when a row is added, it is added at the end of all rows since its ID is incremented from the last ID in the table. I am working with less than a 1,000 items.
Is there common logic or a property I can change to make adding a new row visible at the beginning by default? This way a user can visibly confirm that their actions succeeded.
Some ideas around this are:
Add a date created field and have it hidden by default, but sort by newest date
Figure out a way to make the ID column invisible and display the largest ID first..this not scalable when using GUIDs which I would prefer :(
Temporarily render the newly added row data in a special container in the table? No idea on how to go about trying this.

Related

Problem with Showing Query Results on a Form

I'm having a Projects lists Continuous form where the form's Record Source is based upon a table.
I have a requirement to display a field from another table which is linked back to original table using its primary key. The primary key is a AutoNumber field, but when displaying in the form I've used Input mask something like this "TMG/FEA/"0000.
So I made:
a unbound list box
and made the Row source as the query which displays the relevant information from second table
This query was created using primary key displayed in form (I mean the [Forms]![Form Name].[Field] ) as the where clause.
But the results returns blank. I'm Stuck here. I'm not sure if the query is not working due to the Input Mask or because of something else. Please help me. Thanks in advance
You should add to form field listbox, and set following values:
Data: primary key of your first table
After this, that field will duplicate ID value. Now you should transform RecordSource of this field in order to see contents from second table. So you should set:
SELECT [PrimaryForeignKeyID], [DetailedField] FROM tblSecond;. Actually I don't know the contents of your second table. Whereas PrimaryForeignKeyID is a field that links second table to first, so-called FK.
After this set following properties of list box:
ColumnCount = 2
ColumnWidth = 0;2
AllowEdits = False
Save form and open it for viewing.
In this case, your listbox will show the associated contents of second table on form.
So to my mind it is better for you to do such simple tables and forms, and you'll realize idea.

Ms Access: How do I populate a table using a field in a form?

I want to populate a table in Access that I've just created. I gave it 6 columns. I also made a form that has 6 field inputs. But now I'm confused as to how exactly you make the form write to the table. I want the table to populate downwards, not just re-updating one row every time (in a previous attempt I managed to have the fields save over the same row, but this isn't what I want). I can provide any extra info as needed.
The Record Source property of your form should be set to the name of your table and Allow Additions set to Yes. The Control Source property of each field on your form should be set to the required column name.
You can create an Add New Record button on your form using the new button wizard, select Categories: Record Operations & Actions: Add New Record.
That is the bare minimum to start creating new records in your table from a new form.

Maintain ngRepeat order while bound data changes

I am new to Angular and I am now learning about directives.
I have created a directive that will create a table.
You can sort the table by clicking on the header arrows.
You can also edit/delete a row by clicking on the action button.
The problem with my table is that when the rows are sorted by some column,
and I edit an item under that column, the table resorts because of the changed data. Thus my currently editting item moves to another row and the current input fields contain a different one.
For example, if I sorted the table by visits, and then I edit a visit data in a row,
changes to :
How can I maintain the current order of the rows during edit,
and only allow resort when I click on the apply button (check) ?
You can copy the model which will be edited during editing. And in your save function, update the actual model in table list.

Component to dynamically Reshuffle the table contents in Adf

Is there any ADF Component that will let me to dynamically reshuffle the records in a table?
That is, if there are 50 records in a table and I want to re-order the first record with 20th record in a user interface way?
That is, 20th record will be displayed in the top order followed by the first record.
There is no out of the box feature, but you can do this by retrieving the iterator behind this table, and start messing around with the rows and do whatever you want, this and this can be helpful to show you a way to do it.

Inserting rows into pagedcollectionview, while preserving the location

I have to create a grid which allows sorting and filtering. Currently I am able to achive this by binding PagedCollectionView of the data. I would like allow user to insert or delete row from the grid with context menu. User can select a row and right click on the context menu and insert or delete a row. I can delete the current row, but adding row got me stumped. When I insert a new row and since I do not know any values, I insert a blank row and that end up coming at the end of the grid.
One solution I am working on is to copy the previous row of the gird and using converter, if the row is dirty display blank.
Just curious, is there a better way of inserting row at current place in a grid while keeping sorting and filtering in place?
Thanks,
Just in case anyone is interested, what I ended up doing is insert the row in the grid manually with out paged collection view to keep the sorting and in the code behind insert a dummy row.

Resources