B Bapha Member Sep 23, 2022 #1 Hello friends, How can we insert new row after the (below) current selected row in B4X table. For example we have 4 items in B4X table, i click first row and insert new row should be go to second row of B4X table. Here is sample picture what i am looking for. Thanks in advance.
Hello friends, How can we insert new row after the (below) current selected row in B4X table. For example we have 4 items in B4X table, i click first row and insert new row should be go to second row of B4X table. Here is sample picture what i am looking for. Thanks in advance.
M Mahares Expert Licensed User Longtime User Sep 24, 2022 #2 Bapha said: insert new row should be go to second row of B4X table Click to expand... You can't simply insert a record below the selected record because the B4XTable data displayed is stored in a SQLite in-memory database and the record goes to the end of the table. But what you can do is add an internal sort to the column in question say in this case it is called: 'Make'. When you define the columns and their data type that column will be defined like this: Code: Copy B4XTable1.AddColumn("Make", B4XTable1.COLUMN_TYPE_TEXT).InternalSortMode = "ASC" After you insert the new record, the table gets automatically sorted by that column and the record is displayed below the one with the same make. Upvote 0
Bapha said: insert new row should be go to second row of B4X table Click to expand... You can't simply insert a record below the selected record because the B4XTable data displayed is stored in a SQLite in-memory database and the record goes to the end of the table. But what you can do is add an internal sort to the column in question say in this case it is called: 'Make'. When you define the columns and their data type that column will be defined like this: Code: Copy B4XTable1.AddColumn("Make", B4XTable1.COLUMN_TYPE_TEXT).InternalSortMode = "ASC" After you insert the new record, the table gets automatically sorted by that column and the record is displayed below the one with the same make.
B Bapha Member Sep 25, 2022 #3 I thought DataGridView1.Rows.Insert(DataGridView1.CurrentCell.RowIndex + 1, "Ferrari") like in vb.net. Thank you for description Mahares Best regards. Upvote 0
I thought DataGridView1.Rows.Insert(DataGridView1.CurrentCell.RowIndex + 1, "Ferrari") like in vb.net. Thank you for description Mahares Best regards.