We have project tasked to the team using Windev Mobile for android platform, the task is to create table control on a window (Just one window) and the table must able to show the record that retrived from query or datafile. We still not able to find solution to make the table control capable adding column and row automaticliy acording to datafile
To elaborate on what I meant, my team and I are trying to create a database manager app in Windev Mobile (for HFSQL), what we're tasked with is to make 2 windows, one window to choose which data table (the files within the analysis which exist in the database), and another window that will be used to manage (Create, Read, Update, Delete) the data within the table.
We have been able to create the first window, but the second window is what is currently confusing us, because we need to make it possible to use a window that contains a table that would expand/decrease the amount of columns based on the data table we loaded (for example "client data" data table has 5 data headers (client_name
, client_address
, client_phoneNum
, client_type
, client_eMail
) , so the table should have 5 columns, and providers data table has 10 data headers so the table should have 10 columns) like how excel would act when we open different excel files
Right now we able to create flexible table, it will display table and column from difrent datafile. We are using BuildBrowsingTable to display column and FileToMemoryTable to display the record. The table control will adjust itself acording datafile we select. But it will cause problem when we try manage the data on the table (add, modify, delete)
FOR i = 1 TO arrAdd.Count()
q.arrAdd = edt
END
Note : q (datafile), arrAdd (is column on table) and edt (Edit Control value)
unfortunately it not allow us use "." on this line
q.arrAdd = edt // '.'
operator not allowed on Unicode String Element
Any advice, how to fix this?
If anyone have same problem like this, currently there no easy solution for this. We have finish the project and the only way to do this with Windev 24 is by
Create table control (Dispay_Datafile) that contain list of datafile name on the analysis.
When row selected (Display_Datafile) the data will displayed on other table control (Display_Record). To do this you have to create if condition to check if string on selected row is the same with Datafile name, then you can have it display the record from query/datafile that you declare inside if condition. Currently there no solution to do looping here, you have to create if statement for every datafile.
From here you can access query/datafile to display the record on Edit Control
This is how we do it right now, I hope it will help you