|
-
Jan 7th, 2009, 05:17 AM
#1
Thread Starter
New Member
Delete Row in MSFLexGrid...
Please, any kind of you can help me How to Delete Row in MSFLexGrid..
so, when i click the button 'RENAME' and 'DELETE' it Could be processed.
So, How to do that..??
Please some kind of you could help me
this, i've got pic for my app..
Last edited by melvy; Jan 7th, 2009 at 10:40 PM.
-
Jan 7th, 2009, 07:12 AM
#2
Re: Delete Row in MSFLexGrid...
Welcome to the forums. 
I have no idea what you mean by RENAME? Rename what?
As far as deleting is concerned, remove the record from your datasource (typically a database table) then clear and reload the grid.
-
Jan 7th, 2009, 07:52 AM
#3
Re: Delete Row in MSFLexGrid...
A "RENAME" button click should issue an UPDATE statement to your underlying record in your table. A "DELETE" button would execute a DELETE statement to the table. Then refresh the grid by rebinding your datasource.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jan 7th, 2009, 01:02 PM
#4
Re: Delete Row in MSFLexGrid...
To delete a row in the MSFlexGrid call the RemoveItem method passing it the row number you wish to delete.
MSFlexGrid1.RemoveItem 4
-
Jan 7th, 2009, 06:34 PM
#5
Lively Member
Re: Delete Row in MSFLexGrid...
Code I kinda got to work to rename stuff. Label1.caption would equal the selected row number. Load the data into text box then save the text box as the same row.
Code:
Private Sub Command3_Click()
If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Then
MsgBox "Please Fill In The Required Text Box's" 'Error Report
Else
'Save to Flexgrid
Msflexgrid1.TextMatrix(Label1.Caption, 0) = Text1.Text
Msflexgrid1.TextMatrix(Label1.Caption, 1) = Text2.Text
Msflexgrid1.TextMatrix(Label1.Caption, 2) = Text3.Text
Msflexgrid1.TextMatrix(Label1.Caption, 4) = Text4.Text
Label1.Caption = ""
End If
End Sub
Code:
Private Sub Command2_Click()
Dim i
For i = Msflexgrid1.Row To Msflexgrid1.RowSel
Text1.Text = Msflexgrid1.TextMatrix(i, 0)
Text2.Text = Msflexgrid1.TextMatrix(i, 1)
Text3.Text = Msflexgrid1.TextMatrix(i, 2)
Label1.Caption = i
Next i
End Sub
"What is a hackers worst nightmare you may ask? Vista! Not that its hard to bypass its just that it gives you stupid annoying errors!"

-
Jan 7th, 2009, 10:43 PM
#6
Thread Starter
New Member
Re: Delete Row in MSFLexGrid...
OMG,, your reply was so fast..
hahhahaha
Ok,, Now you can take a look at my pic at the top post..
ehm, So sorry if my english wasn't good..
i just try to be better..
-
Jan 7th, 2009, 10:45 PM
#7
Thread Starter
New Member
Re: Delete Row in MSFLexGrid...
 Originally Posted by Hack
Welcome to the forums.
I have no idea what you mean by RENAME? Rename what?
As far as deleting is concerned, remove the record from your datasource (typically a database table) then clear and reload the grid.
I just add a pic to my post..
Take a look over that dude...
thanx
^^
-
Jan 8th, 2009, 08:38 AM
#8
Re: Delete Row in MSFLexGrid...
Do you mean to say you don't know how to execute the commands for those menus? They have Click events that you could use if that is what you are asking.
-
Jan 28th, 2009, 02:12 PM
#9
New Member
Re: Delete Row in MSFLexGrid...
To Delete a row from a MsFlexgrid is fairly simple; thats if i understood your question.
Paste this code sample.
Private Sub MSFlexGrid1_DblClick()
'This helps to remove the selected row
MSFlexGrid1.RemoveItem MSFlexGrid1.RowSel
End Sub
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
|