Thread: MS FlexGrid Problem
-
September 3rd, 2002, 05:57 PM #1
MS FlexGrid Problem
I keep on getting stuck with this one problem,
( this is part of a 'test'scenario, hence the inflexibility)
Create a 2 column flexigrid,
Populate the grid from a txt file, so that col1 contains text, col2 contains numbers.
txt file example
"chair"
4.50
"table"
5.50
I kinda get it to work, then code some more, ( dragdrop stuff etc)and it stops.
Any suggestions ?
-
September 3rd, 2002, 06:51 PM #2Not Really a Member
- Join Date
- Oct 2001
- Posts
- 27,856
have you tried running it line by line to see where it 'stops' ?
You can put a breakpoint at some point where you know it still works, and then run line by line from that point with F8...Helicopters don't fly; they vibrate so much and make so much noise that the earth rejects them.
-
September 3rd, 2002, 06:55 PM #3
yes, tried debug routines vass, in fact the prog does not 'stop' per say, just refuses to populate both columns, only fills col1.
if I run the populate only sub, it works.
If I post the code, would that help ?
CBB
-
September 3rd, 2002, 07:00 PM #4
code section,
Do Until EOF(fnum) 'Loop until end of file
Line Input #fnum, FileData
Line Input #fnum, FileData1
grdParts.Row = intcount
grdParts.Col = 0
grdParts.Text = FileData 'Get part No
grdParts.Row = intcount
grdParts.Col = 1
grdParts.Text = FileData1 'Get Description
intcount = intcount + 1
Loop
Close #fnum 'Close file
grdParts.Rows = intcount - 1
Does it help ?
CBB
-
September 3rd, 2002, 07:09 PM #5Not Really a Member
- Join Date
- Oct 2001
- Posts
- 27,856
well for one .. thats going to be a bit confusing to follow if you ever get more than one column.
the other.. I'm not really familiar with flexgrid I've only used janus grid. Are you sure the column index starts at 0 and not 1?
Personally I'd suggest organizing the text file a little better such as
column1data1,column2data1
column1data2,column2data2
column1data3,column2data3
column1data4,column2data4
column1data5,column2data5
column1data6,column2data6
column1data7,column2data7
and then read in teh string and place the information into an array with the Split function
arrayname = split(inputstring, ",")
Helicopters don't fly; they vibrate so much and make so much noise that the earth rejects them.
-
September 3rd, 2002, 07:21 PM #6
Vass,
That sounds kewl, but,
the text file will be provided by the tester, and will be in the format described,
As far as I am aware, the column index starts at 0.
I am loth to post the whole shebang in here, because as it is part of a test, your coding the whole thing for me will not teach me how,
I have spent MANY a sleepless night on this one, lol.
Sometimes, I feel incredibly stupid, other times inspiration fires me.
VB.Net next..................
OMG NOooooo
CBBLast edited by cowboybooter; September 3rd, 2002 at 07:23 PM.
-
September 3rd, 2002, 08:06 PM #7Not Really a Member
- Join Date
- Oct 2001
- Posts
- 27,856
YGPM CBB
Helicopters don't fly; they vibrate so much and make so much noise that the earth rejects them.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)



LinkBack URL
About LinkBacks



Reply With Quote

Hello friends..!!! You have to watch all following shows and movies at weekend time. One Life To Live Episode 18 Nikita Season 3 Episode 22 Watch Frances Ha Online Watch The Last Stand Online...
Free online movies