01-14-2009, 01:59 AM
Hi,
I am trying to add a row of data into a QMGrid. I thought I knew how to do this directly but I realize I have been populating the QMGrid using ToQmGrid and FromQmGrid using Sqlite i.e. I have been adding the row to the Sqlite database and then repopulating the QmGrid from the Sqlite database.
That is find but now I want to grab some data from some other user entry field in the dialog and then have them be added to the QmGrid which is also in the dialog. I will save to the Sqlite database at dialog closure (or through Save button) but want to just add directly first to the QmGrid.
(e.g. Grab items from Field 1, 2, 3, 4 in the dialog and add those to columns 1, 2, 3, 4 in the last row of the QmGrid (i.e. new row entry).
I think I may have to use LVM_INSERTITEM but not sure how to use it and if only applicable at QmGrid at initialization. Any suggestions.
Thanks so much!!
Stuart
I am trying to add a row of data into a QMGrid. I thought I knew how to do this directly but I realize I have been populating the QMGrid using ToQmGrid and FromQmGrid using Sqlite i.e. I have been adding the row to the Sqlite database and then repopulating the QmGrid from the Sqlite database.
That is find but now I want to grab some data from some other user entry field in the dialog and then have them be added to the QmGrid which is also in the dialog. I will save to the Sqlite database at dialog closure (or through Save button) but want to just add directly first to the QmGrid.
(e.g. Grab items from Field 1, 2, 3, 4 in the dialog and add those to columns 1, 2, 3, 4 in the last row of the QmGrid (i.e. new row entry).
I think I may have to use LVM_INSERTITEM but not sure how to use it and if only applicable at QmGrid at initialization. Any suggestions.
Thanks so much!!
Stuart