Hi Guys,
I have a sql query which populates a variable called tTheData with about 5 fields from my SQLite database. I then use the following command to populate the datagrid with the data thats been returned.
set the dgText of group "myDataGrid" to tTheData
This all worked great, however Item 3 of each row in tTheData is a date field and I now need to store this in YYYY-MM-DD in a text field in my database so I can query against it fairly reliably. The problem is, I don't want it to display like that on my dg on my user interface, so I wrote a function called sqlToDMY which converts it to the display format I want to see it in. Question is, what is the best way to get the third row of data wrapped around my function, logic suggests a use a loop to go through tTheData and rewrite the 3 field and the set the dg, but which loop and is there an easier way?
Many thanks as always
Jalz
format data before setting the datagrid
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: format data before setting the datagrid
Hi.
Always best to format DG stuff is in the clear. So, yes, change tTheData using chunk and delimiter tools, and then load into the dataGrid.
Craig Newman
Always best to format DG stuff is in the clear. So, yes, change tTheData using chunk and delimiter tools, and then load into the dataGrid.
Craig Newman
Re: format data before setting the datagrid
You could add a custom behaviour to that namely column and script a "fillindata" handler for that,
but looping through the data first seems to be a lot more straightforward and easier!
but looping through the data first seems to be a lot more straightforward and easier!
