Quantcast

Maximum PC

It is currently Tue Oct 21, 2014 9:03 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: VB6 Datagrid control
PostPosted: Wed Aug 17, 2005 5:07 pm 
8086
8086

Joined: Thu Jul 29, 2004 8:34 am
Posts: 78
Location: Virginia
Anyone have a good site that details how to remove data from a datagrid control in VB6. I've searched a couple books and online, yet i still can't find anything on how to access an element in a row which the user has highlighted.- Thanks for the help

-Chris


Top
  Profile  
 
 Post subject:
PostPosted: Sun Aug 21, 2005 5:23 am 
Team Member [Top 500]*
Team Member [Top 500]*
User avatar

Joined: Thu Jun 24, 2004 2:22 pm
Posts: 8720
Location: Cleveland, Ohio
Hi and I am not sure I know exactly what you mean but assuming a dataGrid you would have:

DataSource=ADO Data Control's name

You would also set the AllowAddNew, AllowDelete, and AllowUpdate properties to true or false.

To delete a record in a DAO recordset , you use the Delete method and then you update the recordset. You would have a Delete button on your form, and maybe a few text boxes displaying the data. Something like this:

Private Sub Command1_Click()
Text1.Text=""
Text2.Text=""
dbrecordset.delete
End Sub

When the user clicks the Delete Button (Command1) the two text boxes Text1 and Text2 that display the data (for the current record) are cleared
and the record is deleted.

Is that what you mean?

Ron


Top
  Profile  
 
 Post subject:
PostPosted: Sun Aug 21, 2005 5:29 pm 
8086
8086

Joined: Thu Jul 29, 2004 8:34 am
Posts: 78
Location: Virginia
I was looking for a way to go directly into the cell, although I’m starting to think there is no way to directly access the datagrid. I’m going to try to access the record set but other wise I’m thinking of changing it to a MSFlexgrid.

an example of what i was trying to do would be

number = grdDatagrid.index(4,4)

I know that’s not syntactically correct but its an example of what im trying to do.


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

© 2014 Future US, Inc. All rights reserved.