Jump to content

Search the Community

Showing results for tags 'radiogroup'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 1 result

  1. bazzer747

    RadioGroup Oddity

    Hi, I have a table which has an internal calculated field nHcap. It is a numeric field with values from 1 to 54. In the table I have another field which has a value of either 'Div 1', 'Div 2', or 'Div 3'. I use a RadioGroup with these three values available for selection, and when a selection is made I filter the table to show only records that have a certain nCap value. These values are 'Div 1' from 1 to 17, 'Div 2' from 14 to 21, and 'Div 3' from 20 to 54. The OnCLick event for the RadioGroup looks like this: procedure TfLadyMembers.rgDivsClick(Sender: TObject); var cChoice: String; begin dm.vMembers.Filtered:= False; //Start with clean slate cChoice:= rgDivs.Items[ rgDivs.ItemIndex ]; with dm.vMembers do begin if cChoice = 'Div 1' then Filter:= 'nHcap < 17'; if cChoice = 'Div 2' then Filter:= 'nHcap > 13 AND nHcap < 21'; if cChoice = 'Div 3' then Filter:= 'nHcap > 20'; Filtered:= True; end; if cChoice = 'All' then dm.vMembers.Filtered:= False; end; The problem I'm seeing is that when 'Div 1' is first clicked the filter gives incorrect records. Clicking the other buttons gives correct results, and subsequent clicks on 'Div 1' gives the correct results. I've traced the code in debug mode and the correct select/filtering is executed, so why am I getting incorrect records on the first selection. Very odd.
×