|
-
Apr 7th, 2005, 02:56 PM
#1
Thread Starter
Member
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
-
Apr 7th, 2005, 03:03 PM
#2
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.
-
Apr 7th, 2005, 03:06 PM
#3
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.
-
Apr 7th, 2005, 03:12 PM
#4
Thread Starter
Member
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.?
-
Apr 7th, 2005, 03:14 PM
#5
Re: any of you got an editable,maskable grid control?
 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.
-
Apr 7th, 2005, 03:29 PM
#6
Thread Starter
Member
Re: any of you got an editable,maskable grid control?
if you donot give me examples i am bound to fail
Plz.
-
Apr 7th, 2005, 03:39 PM
#7
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.
-
Apr 7th, 2005, 03:45 PM
#8
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.
-
Apr 7th, 2005, 07:15 PM
#9
Fanatic Member
Re: any of you got an editable,maskable grid control?
-
Apr 7th, 2005, 08:09 PM
#10
Re: any of you got an editable,maskable grid control?
I have heard of the True DBGrid, it might be of help to you....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|