CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: MSflexgrid

  1. #1
    Join Date
    Mar 2001
    Posts
    67

    MSflexgrid

    I use the following loop to plot data on a MSFlexgrid.

    With Msflexgrid1
    for intctr= 0 to 10
    .col=1
    .row= intctr
    .data = rstbl("field1")
    next intctr
    end with



    I am loading the msflexgrid with data from a external database field1. However there are certain rows in the database that have ineligible data.I do not wish to plot this, but I wish to continue using the for loop and the counter. Is there any way to plot the graph, so that certain data can be ommitted if and when I want?
    I thank you.




  2. #2
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: MSflexgrid

    Put a check for valid data in your loop. ONly and if only execute the code. Here is your sample revised to ingore invalid data

    With Msflexgrid1
    for intctr= 0 to 10
    If DataIsValid then
    .col=1
    .row= intctr
    .data = rstbl("field1")
    end If
    next intctr
    end with



    Note the "If" and "End If" statements. You will need to replace the DataIsValid word with a test of your own of course.



    John G

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured