| |

VerySource

 Forgot password?
 Register
Search
View: 703|Reply: 3

Insert a new record into the data table, always at the last

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-16 10:40:01
| Show all posts |Read mode
I use the Grid control to display a data table, and a command button is for inserting records. I want to insert a new record after the current record position of the data table displayed by the Grid, but it is always unsuccessful. Each time I add a new record to the end of the data table. It was later discovered that because one of the fields in this data table had a common index built, removing the index was no problem, but I still need to use this data table in other places. The index must be available, and it ca n’t be solved. Where is the master? I I tried to see that there is a command to close the index, but the position inserted after use is always at the head of the table, which is the first one, anxious!
Reply

Use magic Report

1

Threads

19

Posts

14.00

Credits

Newbie

Rank: 1

Credits
14.00

 China

Post time: 2020-1-20 13:45:01
| Show all posts
Isn't it good to put a few text boxes on the form and insert them with insert?
Reply

Use magic Report

0

Threads

18

Posts

17.00

Credits

Newbie

Rank: 1

Credits
17.00

 Singapore

Post time: 2020-1-31 13:45:01
| Show all posts
Try

Set Order To or CLOSE INDEXES

It is not necessary to pay attention to the physical position in the record table.If you want to follow the current position,
For inserts, it is best to index the column.

If the data in this column is: 1,5,6,8,10,

Then if you want to insert a record between 7 and 8, insert it directly, then Set Order To
When indexing, the record of 7 will stay in the middle of 6 and 8.
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-2-1 06:54:01
| Show all posts
Set Order to and Close indexes are still displayed at the end
I want to click the "Insert" command button at the current position on the data table displayed by the Grid control, then display an empty record on the data table of the Grid, and then enter the content directly on the empty record
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list