Re: More Data Grid Difficulties - Making it request data
On Mar 16, 2010, at 12:15 AM, Len Morgan wrote: I found the manual pages for coloring lines in a data grid table but it's not working. I'm pretty sure that the reason is because I'm settting the dgText to the array I create from the database records and that is bypassing the FillInData routine. Setting the dgText does not bypass FillInData. You can't actually display any data in the Data Grid without FillInData being called. What makes you think it is being bypassed? What columns have you defined in your data grid table and how are you assigning in the dgText? -- Trevor DeVore Blue Mango Learning Systems ScreenSteps: http://www.screensteps.com Releasable Revolution Resources for Developers: http://revolution.bluemangolearning.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: More Data Grid Difficulties - Making it request data
On 3/16/2010 6:57 AM, Trevor DeVore wrote: On Mar 16, 2010, at 12:15 AM, Len Morgan wrote: I found the manual pages for coloring lines in a data grid table but it's not working. I'm pretty sure that the reason is because I'm settting the dgText to the array I create from the database records and that is bypassing the FillInData routine. Setting the dgText does not bypass FillInData. You can't actually display any data in the Data Grid without FillInData being called. What makes you think it is being bypassed? What columns have you defined in your data grid table and how are you assigning in the dgText? To answer your first question, the lines aren't getting colored and I have a message that's supposed to print to the message box as it goes by. I went so far as to put a 500 ms delay in this routine (so EVERY column would wait 1/2 a second just in case the message got overwritten by a later message. I'm not sure what you mean exactly by what columns have you defined. They are all text fields, (e.g., no icons, images, buttons, etc). I create the data array by going though the returned data a line at a time and creating a tab (col) delimited, cr (row) delimited variable then use: set the dgText of group searchResults to theDataA To clarify your first comment, if I set the entire data array using dgText, does it call FillInData for every line possible or only the visible ones? The reason I ask is that one of the things I want to do with FillInData is to get three more fields that don't come out of the original query. I have two dates that come out of another table and have not been able to come up with any SQL query that would return these fields in the original query. What I want to do is when FillIndata gets to the first field (key field), I can call another query for that one record only. As each row is processed, I can get these two dates. This will not be a processing burden IF I only fill the data that is on the screen at the time. The last field I need isn't really a field but rather, based on the value of this field, I need to set the row color. This field I DO have at the time theDataA array is created. len ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: More Data Grid Difficulties - Making it request data
On Mar 16, 2010, at 8:10 AM, Len Morgan wrote: To answer your first question, the lines aren't getting colored and I have a message that's supposed to print to the message box as it goes by. I went so far as to put a 500 ms delay in this routine (so EVERY column would wait 1/2 a second just in case the message got overwritten by a later message. I think I need some more information about how you have set up your data grid. Where have you defined FillInData? Have you created a custom column behavior for your table as described in this lesson? http://lessons.runrev.com/spaces/lessons/manuals/datagrid/lessons/7327-How-Do-I-Override-the-Default-Behavior-For-Rendering-Data-to-a-Cell- I'm not sure what you mean exactly by what columns have you defined. They are all text fields, (e.g., no icons, images, buttons, etc). I create the data array by going though the returned data a line at a time and creating a tab (col) delimited, cr (row) delimited variable then use: On the Columns tab of the data grid object inspector you define the columns in your data grid. This affects which columns appear in your data grid table. To clarify your first comment, if I set the entire data array using dgText, does it call FillInData for every line possible or only the visible ones? Only the visible ones. A data grid will only ask for data on an as- needed basis UNLESS you set the cache controls property to true. But that only works with forms so it won't apply in your case. The reason I ask is that one of the things I want to do with FillInData is to get three more fields that don't come out of the original query. I have two dates that come out of another table and have not been able to come up with any SQL query that would return these fields in the original query. In situations like this I have run the necessary queries, joined the results and then assigned the resulting data to the data grid. What I want to do is when FillIndata gets to the first field (key field), I can call another query for that one record only. As each row is processed, I can get these two dates. This will not be a processing burden IF I only fill the data that is on the screen at the time. If you want to go this route you could modify your FillInData routine to look something like this: on FillInData pData ## Note: Not very efficient as FillInData is called for every column of every row ## Check if date column has been fill in yet. if GetDataOfIndex(the dgIndex of me, Date 1) is empty then ## Query db and get date values... ## Assign to row in Data Grid SetDataOfIndex the dgIndex of me, Date 1, theDateValue end if set the text of me to pData end FillInData The last field I need isn't really a field but rather, based on the value of this field, I need to set the row color. This field I DO have at the time theDataA array is created. The instructions for colorizing a line described in the lesson should work then. Let me know about whether or not you set up the custom column behavior and we can go from there. -- Trevor DeVore Blue Mango Learning Systems ScreenSteps: http://www.screensteps.com Releasable Revolution Resources for Developers: http://revolution.bluemangolearning.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
More Data Grid Difficulties - Making it request data
I found the manual pages for coloring lines in a data grid table but it's not working. I'm pretty sure that the reason is because I'm settting the dgText to the array I create from the database records and that is bypassing the FillInData routine. I guess what I need to do is only fill in the records when asked for by the data grid. How exactly would I do that? I need to keep the records in the order they come in from the database but once they are in the table, they could be changed as long as I could get back to the correct line number in my variable. I do NOT need to edit any of the data in the grid. It's only purpose is to display a list of people that are returned from a query (made up on the spot based on the fields the user types in). They need to be able to scroll the list (could be as many as 300 names) and they need to be able to double click on a line to select that person. As long as I can get the data from the first column, I can manage the rest (in fact, that part is working fine right now. I read the entire query result in rather than using a cursor so the examples in the data grid manual I don't think are going to help. Is there a way I can: 1) Do the query 2) Convert the results into a tab/return delimited list of records 3) Tell the data grid to start filling in the data and request the line numbers from me I have 1 and 2 done. All I need is a way to tell the data grid to start requesting the visible rows and (hopefully) pass me the line number it wants (which will match up with my line numbers). After that, I think the colorization routines will fire and do their thing. Thanks! len morgan ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution