Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid
Message
From
21/01/1999 14:44:38
 
 
To
21/01/1999 14:38:50
Senna Dwipayana
Indo Rebel Apparel Cv
Bandung, Indonesia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Re: Grid
Miscellaneous
Thread ID:
00178390
Message ID:
00178649
Views:
31
>>For listbox I would expect this code to be in Listbox.InteractiveChange.
>Actually the code is very very long, the grid can be change from many controls, listbox, combobox (that I use for the header of grid), it's kinda difficult to explain whole project, but I'll try to make it simple,
>
>myTable1
>bodypart C(100)
>color C(100)
>combo N(10,0)
>
>I make a temporary cursor on ;
>grid.init()
>Create cursor myTempCursor1 (qty N(10,2),part1 C(100))
>WITH THIS
>.RecordSource='myTempCursor1'
>.RecordSourceType=1
>.ColumnCount=2
>.HeaderHeight=0
>.Column1.Width=55
>.Column2.Width=100
>ENDWITH
>
>And on listbox.interactivechange()
>THIS.PARENT.myGrid1.AddData(This.Value)
>
>myGrid1.AddData
>Select * ........
>
>Do vfpxtab WITH 'myTempCursor1'
>
>THIS.COLUMNCOUNT=FCOUNT('myTempCursor1')
>DIMENSION THIS.HeaderArray(FCOUNT('myTempCursor1')-1,1)
>For i=1 TO Fcount('myTempCursor')
>This.HeaderArray(i)=Field(i+1,'myTempCursor1')
>THIS.COLUMNS(i).CONTROLSOURCE=FIELD(i,'myTempCursor1')
>THIS.COLUMNS(i+1).Width=100
>Endfor
>
>This.Refresh()
>
>Actually, if change to a same listbox.value twice, just like :
>listbox.Interactivechange() &&& 1st Changes (eq, Value=5)
>Grid.addData() &&&normal
>
>listbox.Interactivechange() &&& 2nd Changes (eq, Value=2)
>Grid.addData() &&&normal
>
>listbox.Interactivechange() &&& 3rd Changes (eq, Value=5) same as 1st changes
>Grid.addData()
>
>on The last changes of Listbox.value, The last column of grid changed it's size to 75 even though I put 100 in a loop on grid.AddData(), but on the 1st changes, size of last column of grid is 100.

What if you will reset recordsource before ColumnCount=Fcount()?
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform