General information
Category:
Forms & Form designer
Hi David,
How have you been ? You lost me a little here. I can understand how container could combine fields but I still have problem, if field3 is not empty I want to disply fields3 on next line. Let me give you a little more info
Sample table with data
field1 field2 field3
recno 1 aaa 111111
recno 2 bbb 222222
recno 3 ccc 333333 test short note upto 80 char
recno 4 ddd 444444
I want to display like this in grid
aaa 111111
bbb 222222
ccc 333333
test short note upto 80 char
ddd 444444
Thanks Clark !!
>Clark,
>
>Create a container class that has all the controls in it. Make the grid a single column not bound to anything, replace the Text1 control with your container class.
>
>
>>I have a table ( test1 ) with three fields
>> field1 c (40)
>> field2 c (40)
>> field3 c (80)
>>
>>I have ten records in the table, field3 is empty in all but one record. I want to always display 2 columns in the grid ( field1, field2 ). If field3 is not empty, I need it to display on next grid line under field1, field2 as a single column. Is this possible ?
>>
>>In order to get needed results now I have created temp table with
>>tmpField1 c (80)
>>tmpRecno I
>>
>>I loop through ( test1 ) row by row and append blank in temp table then replace tmpField1 in the temp table with test1.field1 + test1.field2,tmpRecno with test1 recno()
>>if test1.field3 is not empty than I append blank to temp table and replace tmpfield1 with test1.field3,tmpRecno with test1 recno(). The grid recordsource is the temp table and displays one column, tmpField1.
>>
>>I would rather find a way for grid to handle this without building temp table, my real scenerio has many more fields than this example.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only