Discussion:
Editor field in a Grid
(too old to reply)
Dan Lancour
2008-11-25 22:05:30 UTC
Permalink
In my grid, I have an Editor control that is linked to a memo field. The memo field contains multiple lines but in the grid all that is visible is the portion that fits in the column width. How do I setup the grid column so that I can view all of the lines in the memo field but not be able to change the memo field. I am using 2.6.1.5. in XP.

Dan Lancour
Greg Hill
2008-11-26 17:06:37 UTC
Permalink
Post by Dan Lancour
In my grid, I have an Editor control that is linked to a memo field. The
memo field contains multiple lines but in the grid all that is visible is
the portion that fits in the column width. How do I setup the grid column
so that I can view all of the lines in the memo field but not be able to
change the memo field. I am using 2.6.1.5. in XP.
Dan Lancour
Either make a calculated field and put that in place of what you have now,
because calculated fields are readonly or drill into the rowset fields array
and turn the read only property for that field to false.

Greg Hill
*Lysander*
2008-11-26 23:02:01 UTC
Permalink
How do I get to view multiple lines in the editor control on the grid ?
I can only view one line at present.
I think this is not possible in dBase.
Maybe I am wrong, but that would be a surprising feature
Frank J. Polan
2008-11-27 00:58:37 UTC
Permalink
Dan,

Maybe I don't understand the problem but giving the field in the grid
focus, then clicking the Wrench icon, cause the field to open up and
show multiple lines.

Setting the memo field to readOnly = true in the rowset prevents it
from being changed

Frank Polan
Post by *Lysander*
How do I get to view multiple lines in the editor control on the grid ?
I can only view one line at present.
I think this is not possible in dBase.
Maybe I am wrong, but that would be a surprising feature
Dan Lancour
2008-11-27 02:51:51 UTC
Permalink
Dan Lancour Wrote:

Frank, thats the problem. I don't have any wrench in the grid to click on. If I open the table in the IDE then a wrench is shown and when I click on it, I see multiple lines. What attribute for this column in the grid needs to be set to have a wrench visible ?

Dan Lancour
Post by Frank J. Polan
Dan,
Maybe I don't understand the problem but giving the field in the grid
focus, then clicking the Wrench icon, cause the field to open up and
show multiple lines.
Setting the memo field to readOnly = true in the rowset prevents it
from being changed
Frank Polan
Post by *Lysander*
How do I get to view multiple lines in the editor control on the grid ?
I can only view one line at present.
I think this is not possible in dBase.
Maybe I am wrong, but that would be a surprising feature
Frank J. Polan
2008-11-27 03:46:00 UTC
Permalink
Dan,

You have to click on the field in the grid to make the wrench appear.

What I sometimes do to make the memo field display automatically is
duplicate the important rowset fields underneath the grid , including
an editor object , that redisplay the selected grid row. It's also
where I allow any editing, instead of in the grid

Frank Polan

On Wed, 26 Nov 2008 21:51:51 -0500, Dan Lancour
Post by Dan Lancour
Frank, thats the problem. I don't have any wrench in the grid to click on. If I open the table in the IDE then a wrench is shown and when I click on it, I see multiple lines. What attribute for this column in the grid needs to be set to have a wrench visible ?
Dan Lancour
Post by Frank J. Polan
Dan,
Maybe I don't understand the problem but giving the field in the grid
focus, then clicking the Wrench icon, cause the field to open up and
show multiple lines.
Setting the memo field to readOnly = true in the rowset prevents it
from being changed
Frank Polan
Post by *Lysander*
How do I get to view multiple lines in the editor control on the grid ?
I can only view one line at present.
I think this is not possible in dBase.
Maybe I am wrong, but that would be a surprising feature
Dan Lancour
2008-11-27 15:04:37 UTC
Permalink
Dan Lancour Wrote:

Frank, I found the problem. I have RowSelect=true and consequently, no data is editable when RowSelect=true. I need this to be true, so my users will not be able to view the memo field from the grid.

Dan Lancour
Dan,
Did you verify that the grid column editorControl type was set to 5
Editor
Frank Polan
On Wed, 26 Nov 2008 22:46:00 -0500, Frank J. Polan
Post by Frank J. Polan
Dan,
You have to click on the field in the grid to make the wrench appear.
What I sometimes do to make the memo field display automatically is
duplicate the important rowset fields underneath the grid , including
an editor object , that redisplay the selected grid row. It's also
where I allow any editing, instead of in the grid
Frank Polan
On Wed, 26 Nov 2008 21:51:51 -0500, Dan Lancour
Post by Dan Lancour
Frank, thats the problem. I don't have any wrench in the grid to click on. If I open the table in the IDE then a wrench is shown and when I click on it, I see multiple lines. What attribute for this column in the grid needs to be set to have a wrench visible ?
Dan Lancour
Post by Frank J. Polan
Dan,
Maybe I don't understand the problem but giving the field in the grid
focus, then clicking the Wrench icon, cause the field to open up and
show multiple lines.
Setting the memo field to readOnly = true in the rowset prevents it
from being changed
Frank Polan
Post by *Lysander*
How do I get to view multiple lines in the editor control on the grid ?
I can only view one line at present.
I think this is not possible in dBase.
Maybe I am wrong, but that would be a surprising feature
Greg Hill
2008-11-27 18:56:55 UTC
Permalink
Post by Dan Lancour
Frank, I found the problem. I have RowSelect=true and consequently, no
data is editable when RowSelect=true. I need this to be true, so my users
will not be able >to view the memo field from the grid.
You can still react to mouse clicks on the grid and popup a little form
showing more info i.e. the contents of the memo for the row clicked.

Greg Hill
Frank J. Polan
2008-11-27 19:58:41 UTC
Permalink
Dan,

An alternate way is to make the rowset read only with the Query
requestLive = false

Frank Polan

On Thu, 27 Nov 2008 10:04:37 -0500, Dan Lancour
Post by Dan Lancour
Frank, I found the problem. I have RowSelect=true and consequently, no data is editable when RowSelect=true. I need this to be true, so my users will not be able to view the memo field from the grid.
Dan Lancour
Dan,
Did you verify that the grid column editorControl type was set to 5
Editor
Frank Polan
On Wed, 26 Nov 2008 22:46:00 -0500, Frank J. Polan
Post by Frank J. Polan
Dan,
You have to click on the field in the grid to make the wrench appear.
What I sometimes do to make the memo field display automatically is
duplicate the important rowset fields underneath the grid , including
an editor object , that redisplay the selected grid row. It's also
where I allow any editing, instead of in the grid
Frank Polan
On Wed, 26 Nov 2008 21:51:51 -0500, Dan Lancour
Post by Dan Lancour
Frank, thats the problem. I don't have any wrench in the grid to click on. If I open the table in the IDE then a wrench is shown and when I click on it, I see multiple lines. What attribute for this column in the grid needs to be set to have a wrench visible ?
Dan Lancour
Post by Frank J. Polan
Dan,
Maybe I don't understand the problem but giving the field in the grid
focus, then clicking the Wrench icon, cause the field to open up and
show multiple lines.
Setting the memo field to readOnly = true in the rowset prevents it
from being changed
Frank Polan
Post by *Lysander*
How do I get to view multiple lines in the editor control on the grid ?
I can only view one line at present.
I think this is not possible in dBase.
Maybe I am wrong, but that would be a surprising feature
Frank J. Polan
2008-11-27 13:18:35 UTC
Permalink
Dan,

Did you verify that the grid column editorControl type was set to 5
Editor

Frank Polan

On Wed, 26 Nov 2008 22:46:00 -0500, Frank J. Polan
Post by Frank J. Polan
Dan,
You have to click on the field in the grid to make the wrench appear.
What I sometimes do to make the memo field display automatically is
duplicate the important rowset fields underneath the grid , including
an editor object , that redisplay the selected grid row. It's also
where I allow any editing, instead of in the grid
Frank Polan
On Wed, 26 Nov 2008 21:51:51 -0500, Dan Lancour
Post by Dan Lancour
Frank, thats the problem. I don't have any wrench in the grid to click on. If I open the table in the IDE then a wrench is shown and when I click on it, I see multiple lines. What attribute for this column in the grid needs to be set to have a wrench visible ?
Dan Lancour
Post by Frank J. Polan
Dan,
Maybe I don't understand the problem but giving the field in the grid
focus, then clicking the Wrench icon, cause the field to open up and
show multiple lines.
Setting the memo field to readOnly = true in the rowset prevents it
from being changed
Frank Polan
Post by *Lysander*
How do I get to view multiple lines in the editor control on the grid ?
I can only view one line at present.
I think this is not possible in dBase.
Maybe I am wrong, but that would be a surprising feature
Dan Lancour
2008-11-26 19:34:05 UTC
Permalink
Post by Greg Hill
Post by Dan Lancour
In my grid, I have an Editor control that is linked to a memo field. The
memo field contains multiple lines but in the grid all that is visible is
the portion that fits in the column width. How do I setup the grid column
so that I can view all of the lines in the memo field but not be able to
change the memo field. I am using 2.6.1.5. in XP.
Dan Lancour
Either make a calculated field and put that in place of what you have now,
because calculated fields are readonly or drill into the rowset fields array
and turn the read only property for that field to false.
Greg Hill
How do I get to view multiple lines in the editor control on the grid ?
I can only view one line at present.

Dan Lancour
Dan Lancour
2008-11-27 23:17:26 UTC
Permalink
Dan Lancour Wrote:

Guys, thanks for your ideas and your time.

Dan Lancour
Post by Dan Lancour
In my grid, I have an Editor control that is linked to a memo field. The memo field contains multiple lines but in the grid all that is visible is the portion that fits in the column width. How do I setup the grid column so that I can view all of the lines in the memo field but not be able to change the memo field. I am using 2.6.1.5. in XP.
Dan Lancour
Greg Hill
2008-11-28 06:58:12 UTC
Permalink
Post by Dan Lancour
Guys, thanks for your ideas and your time.
Dan Lancour
Post by Dan Lancour
In my grid, I have an Editor control that is linked to a memo field. The
memo field contains multiple lines but in the grid all that is visible is
the portion that fits in the >>column width. How do I setup the grid
column so that I can view all of the lines in the memo field but not be
able to change the memo field. I am using 2.6.1.5. in >>XP.
Does this grid show a lot of large number of rows and columns?
If it is something like an invoice or the like then it might be worth doing
what I have been doing. I use a custom control that is built on the
container.
It depends on how important this is to you.
The custom approach will work but requires more code.

I typically use it for cases where I need to show child records linked to
the parent as in sales reps who are assigned to a deal, or the line items of
an invoice.

It is not easy to adjust column widths and such, it is more work to manage
but the payoff is "FLEXIBILITY TO NO END"<g>

Greg Hill

Loading...