Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memo field in grid not appearing as 'Memo'
Message
From
14/07/2005 16:27:05
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Novell 5.x
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01032799
Message ID:
01032819
Views:
21
What about just putting a button in the grid with "Memo" on it for each record that has value in the memo field? When it is clicked, you send the keyboard commands for Ctrl-Home. Not sure if the last part works or not, but you could pop-up another form that displays the memo contents.

>I'm sure that this has been discussed before, but because I'm poor and my company won't pay for a UT membership I've got to post this question.
>
>When I have a plain old simple grid and bind it to a table with memo fields the grid columns have what I want and that is 'Memo' and the user can ctrl-home or dblclick to view the contents.
>
>But, when I dynamically bind the grid columns the columns do not appear as 'Memo', but have the memo data expanded and the column becomes ridiculously long.
>
>I'm using autofit. A table called gridbindings controls the grid. The grid class has 50 columns and each column has the methods needed for dblclicking, etc. I delete the extra columns at the end. The code is as follows for a custom method called bindgrid in grid class:
>
>***Sorry about the formating. I don't know what this thing needs to look pretty
>
>ii=0
>select qgridbindings
>scan
> ii = ii + 1
> with this.columns[m.ii]
> .controlsource = alltrim(qgridbindings.fieldname)
>
> if '.' $ .controlsource
> llisMemo = (type(.controlsource) =='M') &&need to use type() and not vartype()
> else
> llisMemo = (type(this.RecordSource + '.' + .controlsource) =='M')
> endif
>
> .addproperty("csortindex","")
> if qgridbindings.sortable and not m.llisMemo
> select (this.RecordSource)
> lcIndexOn = .controlsource
> lcTag = iif(len(.controlsource) > 10,sys(2015),.controlsource)
> try &&just ignore when it tries to index on a memo or blob or other index error
> index on &lcIndexOn tag &lcTag
> .csortindex = m.lcTag
> set order to
> catch
> finally
> endtry
> endif
>
> if empty(qgridbindings.heading)
> .header1.caption = proper(qgridbindings.fieldname)
> else
> .header1.caption = alltrim(qgridbindings.heading)
> endif
>
> if not empty(qgridbindings.format)
> .format = alltrim(qgridbindings.format)
> else
> .format = 'K'
> endif
>
> .header1.Alignment= 1
> .text1.alignment = 3
>
> if qgridbindings.width > -1 &&-1 is the default which means leave it alone
> .width = qgridbindings.width
> endif
>
> endwith
>endscan
>
>do while this.ColumnCount > m.ii
> this.DeleteColumn()
>enddo
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform