Results 1 to 10 of 10

Thread: any of you got an editable,maskable grid control?

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2005
    Posts
    38

    any of you got an editable,maskable grid control?

    i am tired of working with flexgrid. it seems i am not working with it but i am working on it,over it, beside it. i have no experience writing ocx of my own too. does any one have a grid control that gives the user more control over it like editing and masking cells etc..lol

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: any of you got an editable,maskable grid control?

    why not just float a textbox over the cell that you want to edit, and paste the contents back into the cell when you are done? That way you have full control over it.

  3. #3
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: any of you got an editable,maskable grid control?

    I've got to agree with dglienna...

    Although I've seen lots of people with opinions about other grids that can be used, once you code the routine to float the textbox onto the flex grid you are all set.

    It's actually a nice way to compartmentalize your program.

    We have all our FORMS designed with labels that look like textboxes and flex grids. When the user clicks in the label or cell of a flexgrid we float that one single text box onto that spot. All the code for validation and screen movement is related to that one textbox - very easy and neat. We also have a floating combo box for when a combo is more appropriate than a text box.

    The user has no idea that they are not real text boxes and that the cells cannot be really changed.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  4. #4

    Thread Starter
    Member
    Join Date
    Mar 2005
    Posts
    38

    Re: any of you got an editable,maskable grid control?

    floating the same textbox to over everycell sounds good but what about masking? will it not be a problem? i mean i also want to have masks and changing mask of the same textbox over and over how do i go about it.?

  5. #5
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: any of you got an editable,maskable grid control?

    Quote Originally Posted by bikashshrestha
    floating the same textbox to over everycell sounds good but what about masking? will it not be a problem? i mean i also want to have masks and changing mask of the same textbox over and over how do i go about it.?
    I've not used masking myself - so I'm not really sure.

    Can't you change the mask at runtime?

    Basically we store a TAG in each label and in the COLDATA() of the flexgrid that indicates the "rules" for the textbox. When the textbox goes onto a label or cell, we look at the tag and decide how to process the data - validation, formatting - all that good stuff.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  6. #6

    Thread Starter
    Member
    Join Date
    Mar 2005
    Posts
    38

    Re: any of you got an editable,maskable grid control?

    if you donot give me examples i am bound to fail
    Plz.

  7. #7
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: any of you got an editable,maskable grid control?

    Just remember to clear the mask, you have to also clear the value in the textbox. Just set up a function to do it, and you'll be fine.

  8. #8
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: any of you got an editable,maskable grid control?

    Search the forum for TXTINPUT and FLXINPUT - these are control names I use and have posted about in the past...

    Here is a code snippet:

    Code:
        f.txtInput.Appearance = 0
        f.txtInput.Tag = Str$(lngFII)
        f.txtInput.Move f.flxInput(y).CellLeft + f.flxInput(y).Left _
                , f.flxInput(y).CellTop + f.flxInput(y).Top _
                , f.flxInput(y).CellWidth _
                , f.flxInput(y).CellHeight
        f.txtInput.Visible = True
        f.txtInput.Enabled = True
        f.txtInput.ZOrder 0
        f.txtInput.MaxLength = f.flxInput(y).ColData(f.flxInput(y).Col)
        
        f.txtInput.Text = f.flxInput(y).TextMatrix(f.flxInput(y).Row, f.flxInput(y).Col)
        
        f.txtInput.ToolTipText = "Current Entry Field for the Grid"
            '(" & CStr(f.flxInput(y).Row) & "," & CStr(f.flxInput(y).Col) & ")"
    This puts a text box called txtinput onto a cell of a grid called flxinput - it's a control array that's why it's flxinput(y)

    F. refers to ME - the form itself - since we pass the form as an argument to the function that is doing this work.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  9. #9
    Fanatic Member
    Join Date
    Mar 2002
    Location
    AUSTRALIA
    Posts
    603

    Re: any of you got an editable,maskable grid control?

    SGrid2 from VBAccelarator is powerful and free.
    http://www.vbforums.com/showthread.p...ighlight=sgrid
    Rob C

  10. #10
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: any of you got an editable,maskable grid control?

    I have heard of the True DBGrid, it might be of help to you....
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

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