|
-
Feb 4th, 2000, 03:57 AM
#1
Thread Starter
Hyperactive Member
I have an MSHFlexgrid on my form which I populate with records from a database. The first row (number 0) is used for headers and the second row (number 1) has it's height set to zero so it is invisible. I also have a "Delete Record" button that deletes the selected row in the flexgrid. Additionally, I have code set up to give my program the to edit the flexgrid. To do this I have a textbox that "floats" over the appropriate cell. Here is what I can't figure out. The flexgrid populates when the form loads and if I immediately start deleting rows, it will get down to the third row (number 2) it says that it "cannot delete the last non-fixed row." The flexgrid shows all three rows (with the socond one being invisible). However, the program does indeed only count that there are 2 rows. However, if I edit one of the cells first and then delete all of the rows, it will delete all of them and only show the headers (remember, the second row is invisible). Can anyone explain to me why this happens? I would REALLY appreciate it.
------------------
Ryan
-
Feb 4th, 2000, 05:47 AM
#2
If you post your code, including the code that sets the row heights, maybe someone can help?
------------------
Marty
HASTE CUISINE
Fast French food.
-
Feb 4th, 2000, 05:57 AM
#3
Thread Starter
Hyperactive Member
Well, acutally, I figured out the problem. When you clicked the "Delete" button, it would automatically take the first non-fixed row unless you had set the current row to something else prior. So it was deleting the invisible second row and then the third row would take it's place and so on and so forth until there were two rows left: the header row and instead of an ivisible row, there was a row containing information. And that was the problem. So I just changed the code in the "Delete" button so that it would not delete any row that had an index of 1 or lower and, problem solved.
------------------
Ryan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|