Results 1 to 19 of 19

Thread: [Resolved] DBGrid Add, Edit, Delete etc. Help please!

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    540

    Resolved [Resolved] DBGrid Add, Edit, Delete etc. Help please!

    Hey i have a problem. I'm trying to make a program that displays usernames & IP addresses and logon times. I'm using a DBGrid to display the results. The problem is i don't know how to add more coloums! There's only 2 during design time and there's no way to add some more then. Also i don't know how to add data into the table (rows). Or edit it for that fact. I've checked around in google but i don't understand any of it! I know the basics of SQL (Select Blah From Somthing Where name = Bob), but i don't know how to use it with this control in VB. Can some one please help me (Add, Edit Delete, or rearrange Coloumns and rows) From textboxes or variables inside my program please?

    Edit: PM me if you want to help files. This was resolved.














    Added green "resolved" checkmark - Hack
    Last edited by Hack; Jan 17th, 2006 at 09:21 AM.

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    540

    Re: DBGrid Add, Edit, Delete etc. Help please!

    Can you at least tell me if i'm on the right track... thanks, i've never used a DBGrid before...

  3. #3
    Frenzied Member pnish's Avatar
    Join Date
    Aug 2002
    Location
    Tassie, Oz
    Posts
    1,918

    Re: DBGrid Add, Edit, Delete etc. Help please!

    Are we talking True DBGrid here? If so, to add columns right-click on the grid and select Edit from the context menu. Select the column where you want to insert the new column and right-click again, this time select Insert from the menu. Voila!!
    Last edited by pnish; Jan 15th, 2006 at 02:14 AM. Reason: typo
    Pete

    No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    540

    Re: DBGrid Add, Edit, Delete etc. Help please!

    AHH yes that's a great way i didn't see that! Umm i don't know the control name is just DBGrid version 5.01 it says in about made by Apex, but i donnu if that's gonna help. Just Adding, editing & stuff on it, lol

  5. #5
    Frenzied Member pnish's Avatar
    Join Date
    Aug 2002
    Location
    Tassie, Oz
    Posts
    1,918

    Re: DBGrid Add, Edit, Delete etc. Help please!

    DBGrid v5 is getting pretty ancient. Apex has since been bought out by Component One and I think the latest version is 9. You can bind the grid to a data-control which simplifies things, but then the trouble is that bound-controls are quite inflexible. If you bind the grid, the underlying record source will automatically configure the grid, ie number of rows, columns etc. In the OLE DB version of the grid, you can also bind to an ADO recordset which is great. See if you've got the OLE version as well.
    Pete

    No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    540

    Re: DBGrid Add, Edit, Delete etc. Help please!

    Yep i have them. Will this still work if i want to add a row with data using script? Like i won't have to sue the control to add data, but it goes through that control. Is that what they do any way?

  7. #7
    Frenzied Member pnish's Avatar
    Join Date
    Aug 2002
    Location
    Tassie, Oz
    Posts
    1,918

    Re: DBGrid Add, Edit, Delete etc. Help please!

    Yeah.. If you add data to the grid, it automatically adds (or updates) the underlying data.
    Pete

    No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.

  8. #8

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    540

    Re: DBGrid Add, Edit, Delete etc. Help please!

    Can you tell me what i seen to add and how i can update or delete any cell or row please? Using this.

  9. #9
    Frenzied Member pnish's Avatar
    Join Date
    Aug 2002
    Location
    Tassie, Oz
    Posts
    1,918

    Re: DBGrid Add, Edit, Delete etc. Help please!

    To do any editing in the grid you need to set some of its properties first:
    AllowAddNew, AllowUpdate, AllowDelete, these are all boolean (T or F) properties. Have a bit of a play round with it. The manual (or help file) should have some simple examples to try out. If you haven't got the manual (it should be on the CD), try getting one off the net.

    I've gotta go now, if you don't have any luck and no one else here can help you, PM me tomorrow and I'll see what I can do. I haven't used v5 for a long time though
    Pete

    No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.

  10. #10

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    540

    Re: DBGrid Add, Edit, Delete etc. Help please!

    No i couldn't find any help for it I have no idea how this thing works! It doesn't make much sense... is there some place where i can find version 9 or do you have to pay for it? Oh well. Is there any other way that you can Add, Edit etc Fields

  11. #11

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    540

    Re: DBGrid Add, Edit, Delete etc. Help please!

    Or is there any other control that i can use to Add, Edit, Delete Columns Or Rows? With out too much trouble (Doesn't matter if it supports SQL)?

  12. #12
    Frenzied Member pnish's Avatar
    Join Date
    Aug 2002
    Location
    Tassie, Oz
    Posts
    1,918

    Re: DBGrid Add, Edit, Delete etc. Help please!

    I managed to find my original V5 CD so send me a PM with your email address and I'll send you the help files, some sample applications and tutorials which should get you started.
    Pete

    No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.

  13. #13

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    540

    Re: DBGrid Add, Edit, Delete etc. Help please!

    *Bump

  14. #14
    Frenzied Member pnish's Avatar
    Join Date
    Aug 2002
    Location
    Tassie, Oz
    Posts
    1,918

    Re: DBGrid Add, Edit, Delete etc. Help please!

    Did you get all the stuff I emailed you? Have you had a look at the samples, tutorials etc?
    Pete

    No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.

  15. #15

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    540

    Re: DBGrid Add, Edit, Delete etc. Help please!

    No? Slyke .The .Fox@ gmail.com <--Did you send to that one, lol (No spaces).

  16. #16
    Frenzied Member pnish's Avatar
    Join Date
    Aug 2002
    Location
    Tassie, Oz
    Posts
    1,918

    Re: DBGrid Add, Edit, Delete etc. Help please!

    Yep, sent it yesterday. I'll send it again right now. It's a bit over 1.5mb.

    here it comes...
    Pete

    No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.

  17. #17

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    540

    Re: DBGrid Add, Edit, Delete etc. Help please!

    No? i still haven't recieved it! We can try MSN or i'll give you a site to upload if you want... Other wise thanks any way.

  18. #18
    Frenzied Member pnish's Avatar
    Join Date
    Aug 2002
    Location
    Tassie, Oz
    Posts
    1,918

    Re: DBGrid Add, Edit, Delete etc. Help please!

    I've uploaded it to your web site.
    Pete

    No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.

  19. #19

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    540

    Re: DBGrid Add, Edit, Delete etc. Help please!

    Thank you so much.

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