Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combos in grids that should depend one of each other
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01531225
Message ID:
01531227
Vues:
41
>>Hi everybody,
>>
>>I can use some help as what I've tried so far is all not working and producing error. I attached a picture demonstrating what I want.
>>
>>The grid's RecordSource is 'rsHolds' table. In this table I have LevelID, SectionID, Row fields and each of them I want to pick up from the combobox.
>>
>>Level restricts section selections and section dictates available rows.
>>
>>Here is the code in the Init of the form I tried:
>>
>>WITH thisform.grdHolds 
>>  for each loColumn in .columns
>>   
>>      for each loControl in m.loColumn.controls
>>         if upper(m.loControl.baseclass) = "HEADER"
>>            loControl.Alignment = 2 
>>            loControl.FontBold = .t.
>>            bindevent(m.loControl,"Click",thisform,"HeaderClick")
>>           
>>         endif
>>      next
>>   next
>>
>>   with .colLevels.cboLevels
>>      .rowsource = ''
>>      .rowsourcetype = 3  
>>      .rowsource = "select * from csrAllLevels where LevelID IS NOT NULL order by Descrip into cursor csrBLvls nofilter"
>>      
>>      .parent.ControlSource = 'rsHolds.LevelID'
>>   endwith
>>
>>   with .colSections.cboSections
>>      .rowsource = ''
>>      .rowsourcetype = 3
>>      .rowsource = "select * from csrAllSections where LevelID = ?m.nLevelID order by Descrip into cursor csrSect nofilter"
>>	  .parent.ControlSource = 'rsHolds.SectionID'
>>   endwith
>>
>> with .colRow.cboRows
>>      .rowsource = ''
>>      .rowsourcetype = 3
>>      .rowsource = "select * from csrAllRows where LevelID = ?m.nLevelID and SectionID = ?m.nSectionID order by Row into cursor csrRows nofilter"
>>      .parent.ControlSource = 'rsHolds.Row'
>>   endwith
>>
>>*   .setall('DynamicFontStrikeThru','thisform.RefreshHoldsGrid()')
>>   .refresh()
>>endwith
>>
>>So, the grid does initially display. But as soon as I try to select anything in the combos, I start receiving messages about thisform is only available in a method and lots of other nasty errors.
>>
>>I'm not sure how to make this work.
>>
>>Thaks in advance.
>
>
>You didn't have "thisform" anywhere in this code (or at least at a place where it could cause an error)

I am thinking right now my problem could have been caused by a filter I have. I just re-coded this, will check in a second.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform