Visual Basic

Moderators: None (Apply to moderate this forum)
Number of threads: 17974
Number of posts: 55343

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Delete any Row for FlexGrid Posted by slowtreme on 28 Aug 2001 at 9:02 PM
VB6 MSFlexGrid Control

Using an unbound flexgrid, how can I delete an entire row from the middle of a table. A .DeleteItem in conjuction with the .Additem would have been nice.

Just Clearing the data from the cells does not really help, becuase of the blank row that remains.

Suggestions?

Report
Re: Delete any Row for FlexGrid Posted by slowtreme on 28 Aug 2001 at 9:26 PM
Answering my own question

Ths will delete the currently selected row

flexgrid.RemoveItem flexgrid.Row

Just make sure you are not trying to delete a Header Row, or that last visable row.

Thanks :)

: VB6 MSFlexGrid Control
:
: Using an unbound flexgrid, how can I delete an entire row from the middle of a table. A .DeleteItem in conjuction with the .Additem would have been nice.


Report
Re: Delete any Row for FlexGrid Posted by Malcolm on 13 May 2002 at 4:29 PM
: Answering my own question
:
: Ths will delete the currently selected row
:
: flexgrid.RemoveItem flexgrid.Row
:
: Just make sure you are not trying to delete a Header Row, or that last visable row.
:
: Thanks :)
:
: : VB6 MSFlexGrid Control
: :
: : Using an unbound flexgrid, how can I delete an entire row from the middle of a table. A .DeleteItem in conjuction with the .Additem would have been nice.
:
:
:

You also cannot delete the last non fixed row. This is what I do:

WIth MSFlexGrid1
    If (.Rows > .FixedRows + 1) Then
        .RemoveItem .Row
    Else
        .Rows = .FixedRows
    End If
End With


Report
Re: Delete any Row for FlexGrid Posted by hshlaing on 30 Apr 2009 at 12:30 AM
I used this code to delete the last row of flex gird. but error come out like "Sub or Function not defined"
The following are my coding. I look forward your reply.

Private Sub Cmddelete_Click()
Dim ItemFlexGrid As MSHFlexGrid

If MsgBox("Do you want to remove this record?", vbYesNo) = vbYes Then
With ItemFlexGrid
If (.row > .FixedRows + 1) Then
.RemoveItem .row
Else
.row = .FixedRows
End If
Endwith
End If
End Sub
Report
Re: Delete any Row for FlexGrid Posted by SurendraNath on 13 May 2002 at 3:57 AM
: VB6 MSFlexGrid Control
:
: Using an unbound flexgrid, how can I delete an entire row from the middle of a table. A .DeleteItem in conjuction with the .Additem would have been nice.
:
: Just Clearing the data from the cells does not really help, becuase of the blank row that remains.
:
: Suggestions?
:
:




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.