Results 1 to 3 of 3

Thread: ATTN EXPERTS; Question about MSHFlexgrid

  1. #1

    Thread Starter
    Hyperactive Member Gimpster's Avatar
    Join Date
    Oct 1999
    Location
    Redmond, WA 98052
    Posts
    331

    Post

    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

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Post

    If you post your code, including the code that sets the row heights, maybe someone can help?

    ------------------
    Marty
    HASTE CUISINE
    Fast French food.

  3. #3

    Thread Starter
    Hyperactive Member Gimpster's Avatar
    Join Date
    Oct 1999
    Location
    Redmond, WA 98052
    Posts
    331

    Post

    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
  •  



Click Here to Expand Forum to Full Width