Results 1 to 8 of 8

Thread: DBGrid, MSFlexgrid, Editing

  1. #1
    Guest
    Hi!

    I want the user of my app to be able to enter data in fields the same way as in excel or in access. What is the best (easiest) control to use? (No third party controls please). The data must be at leat 4 "columns" wide (I prefer somthing to be expandble to 5 or more columns). Some columns will contain text, other numeric-values. (Although they could be converted by Val() or so...)

    Here are my considerations so far:

    • The Listview?
      (Can't edit more than first column?)
    • DBGrid?
      (Too Complex)
    • Lots of textboxes in an array?
      (Too Complex, can be done easier I think)
    • Excel/Access Add-in?
      (Too heavy on resources)


    Anyone any good ideas?

  2. #2
    Guest
    Can nobody help me?

  3. #3
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Try the Grid from vbaccelerator.com, it's pretty easy to use and has a lot of configurable options. You can edit stuff too, it uses some depencies, but it looks really good!

    ps: jij bent toch ook nederlands?
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  4. #4
    Guest
    JOP:

    Thanx for the reply, though I don't like to use 3rd party controls. Any other ideas? It doesn't have to be connected to a DB.

    (Ja, ik ben ook nederlands Engels is alleen makkelijker hiero Maar wel bedankt voor de reactie! )

  5. #5
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253
    Does anyone know how to do this?

  6. #6
    Addicted Member Renee K's Avatar
    Join Date
    Jun 2002
    Posts
    163
    I picked this up somewhere a long time ago and it will allow you to edit the MSFlexGrid. Maybe it will help you get a start.

    Code:
    Private Sub MSFlexGrid_KeyPress(KeyAscii As Integer) 
       With MSFlexGrid  
          Select Case KeyAscii  
             Case 8: 'IF KEY IS BACKSPACE THEN  
                If .Text <> "" Then .Text = Left$(.Text, (Len(.Text) - 1))  
             Case 13: 'IF KEY IS ENTER THEN  
                Select Case .Col  
                   Case Is < (.Cols - 1):  
                      SendKeys "{right}"  
                   Case (.Cols - 1):  
                      If (.Row + 1) = .Rows Then  
                         .Rows = .Rows + 1  
                      End If  
                      SendKeys "{home}" + "{down}"  
                End Select  
             Case Else  
                .Text = .Text + Chr$(KeyAscii)  
                'write your own keyascii Validations under  
                'commented lines  
                Select Case .Col  
                   Case 0, 1:  
                      'if (your condition(s)) then accept only charectors  
                      'Else  
                      ' keyascii=0  
                      'End If  
                   Case Else : 
                End Select  
          End Select  
       End With  
    End Sub
    .·*¨) ¸.·*¨) ¸.·*¨*
    (¸.*´ ¸.·´*'~*Renee~* (¸.*´~*



    Funny how the little things can stop you dead in your tracks.

  7. #7
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253
    Want to do it to Listview, not Flexgrid.

  8. #8
    Frenzied Member agmorgan's Avatar
    Join Date
    Dec 2000
    Location
    Lurking
    Posts
    1,383
    It would probably be better to start your own thread
    rather than dredging up 4 year old ones.

    You can then specify cleary what you want to do.

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