Hello everyone,
I am having an issue with the Flexgrid, when I have data shows up on the flexgrid, it seems like it is skipping the rows where the first column is missing data, it would not write to the rest of cells in that row. I am attaching the code as well as the screen print of the flexgrid. The flexgrid is meant to pull stock information for sql, this is for a financial industry. As you could see from the screenprint, the the third row has data in the other columns even if there are no shares or weight. Can you see if there is somewhere in the code that specifies that skip the row if there are no data in the first column, please help, thanks. P.S. Please check the attached image file also, thanks.
Your code is very difficult to read, not formatted properly and lots of stuff that has been commented out makes it hard to follow.
You have several different Select case blocks that are basically the same and from the looks of it each has only one case in it. Each of these are also with in an if block that is doing the same test a bunch of times. It would appear that 1 If block would be enough to check the recordcount. The purpose of Select Case is to have more than one case otherwise you would just use an if statement.
For example Instead of doing this
Code:
Select Case rsAcctData.Fields("Fund")
Case "Endeavor"
End Select
Select Case rsAcctData.Fields("Fund")
Case "vismain"
End Select
Select Case rsAcctData.Fields("Fund")
Case "Global"
End Select
You should be doing
Code:
Select Case rsAcctData.Fields("Fund")
Case "Endeavor"
Case "vismain"
Case "Global"
End Select
As for the source of the issue, I can't tell, maybe if you clean up the code, get rid of all the commented stuff and properly format it then it may be a bit easier to see where the problem is.
Hello, thanks for your suggestion, but when I do what you sugguested me after cleaning up the code, it would not write to the next row, previously the flex screen use to order the funds by the amount of shares, so it will write from bottom to first, but now I am trying to have the funds static, like I have attached on the screen shot, please help, thanks. flexgridissue#2.txt
I'm not really sure what you are trying to do there. The code looks better but is still hard to read due to improper formatting. As for the Select Case the purpose of using a select case statement is to do different things based on different values, typically a case block should have at least 2 or more cases. If your first code was doing what you want or close then perhaps you do not need a select case at all a simple if statement would do the trick.
That said I do not see any looping so maybe that is an issue but I can't be sure because I can't really follow your code and I do not know what you are trying to do.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.