Editable FlexGrid/Grid Control in VB4/5/6

Editable FlexGrid/Grid Control in VB4/5/6

Overview

This code shows how to use a TextBox control with a Grid.OCX (VB4) or a MSFlexGrid.OCX (VB5/6) control to make an editable grid control. It also demonstrates how to copy the selected Cells to the ClipBoard.

Screen Shot

The code works by having a hidden textbox (text1) on the same form as the Grid Control and positioning it over the relevant cell when editing is to occur. The code should work with the standard GRID.OCX control that came with VB4 as well as the MSFlexGrid control supplied with VB5/6. The code has comments to show where FlexGrid only code could be applied.


Download Zipped Project File (3k)



Comments

  • Editable Flexgrid - OCX (VB 6.0)

    Posted by deepasubbu on 11/03/2008 06:51am

    Very nice article sir. We would like to share our tool-> Editable Flexgrid - OCX (VB 6.0) with open source from www.wbcsoftwarelab.com with codeguru community. Regularly we would like to have communication with you. Please visit our www.wbcsoftwarelab.blogspot.com and wbcsoftwarelab forum.

    • abdusaid

      Posted by abdusaid on 09/23/2009 08:14am

      good for source

      Reply
    Reply
  • good

    Posted by mahade on 05/12/2004 10:54am

    fdsdgmn ,shn s,nfg s,fdg

    Reply
  • The fast and sloppy way

    Posted by Legacy on 07/15/2003 12:00am

    Originally posted by: onkl

    Thanks a lot, this is indeed a more decent way than the one discovered earlier by me.
    In return, if this solution is to big for anyone needing a small edit solution, try adding this to your code:

    Private Sub MSFlexGrid1_KeyPress(KeyAscii As Integer)
    Me.MSFlexGrid1.Text = Me.MSFlexGrid1.Text & Chr(KeyAscii)
    End Sub

    Do note however that the solution presented in the main article is, though longer, bettter usable. This one is maybe nice for the "quick-fix" style solution

    Reply
  • My Request

    Posted by Legacy on 06/30/2003 12:00am

    Originally posted by: R. Krishnan

    Sir,

    Pl. let me know how to write code for MSFlex Grid in editable mode.

    If possible can u help me in designing a small program with Flex Grid control with add, mod, del and view buttons.

    thanks
    R.Krishnan

    Reply
  • author email has changed..!

    Posted by Legacy on 05/06/2003 12:00am

    Originally posted by: devrim pakkan

    Thanks for your comments.
    I will try to come with new ideas to make this control more robust.
    new email : devrim.pakkan@superonline.com

    I need a grid control that can handle progress bar inside cells. Any idea.

    Reply
  • Adding a ComboBox to a FlexGrid

    Posted by Legacy on 04/25/2003 12:00am

    Originally posted by: smallo

    Anybody can tell me how can I insert a comboBox into a particular flexGrid's cell.

    Reply
  • how to multiple selection can do

    Posted by Legacy on 04/19/2003 12:00am

    Originally posted by: ganesh


    i have one proble in msflexigrid that is my client wants select at a time number of rows and copy it to another msflexgrid.is it possible to do like that.if possible than give me solution.

    Reply
  • Its Emphatic

    Posted by Legacy on 04/03/2003 12:00am

    Originally posted by: Alok

    Its really a great approach. However, there is only drawback that needs modification. A user double clicks on a field, changes it.. and now as per this approach, he is bound to press 'return/enter' key to make his change permanent, if possible can't we do it also be some other keys say on pressing 'Tab'. So that the user can make changes to multiple grids. The 'Tab' can navigate the user to next field as well as make his changes permanent.

    Reply
  • I love you

    Posted by Legacy on 04/01/2003 12:00am

    Originally posted by: Panda Power

    I've been looking for this everywhere and now you've given me the key.

    Thanks a million!

    Reply
  • pankaj

    Posted by Legacy on 02/02/2003 12:00am

    Originally posted by: pankajpandey

    How to add combo box for a particular cell in a msflexgrid control

    Reply
  • Loading, Please Wait ...

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: December 11, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT Market pressures to move more quickly and develop innovative applications are forcing organizations to rethink how they develop and release applications. The combination of public clouds and physical back-end infrastructures are a means to get applications out faster. However, these hybrid solutions complicate DevOps adoption, with application delivery pipelines that span across complex hybrid cloud and non-cloud environments. Check out this …

  • CentreCorp is a fully integrated and diversified property management and real estate service company, specializing in the "shopping center" segment, and is one of the premier retail service providers in North America. Company executives travel a great deal, carrying a number of traveling laptops with critical current business data, and no easy way to back up to the network outside the office. Read this case study to learn how CentreCorp implemented a suite of business continuity services that included …

Most Popular Programming Stories

More for Developers

RSS Feeds