Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inline in grid editing
Message
 
 
To
06/01/2012 04:01:20
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01532229
Message ID:
01532291
Views:
51
Is there a way to dynamically assign textbox controlsource to be substr(myField,1,240)?

I tried txt.ControlSource = '(substr(' + myField + ')1,240))'

but got an error.


>>Hi everybody,
>>
>>I have a SQL table where several columns defined as varchar(max). I want to be able to display this table in a grid and be able to edit it directly - inline.
>>
>>I am thinking of how to approach this form. Should I display the first 200 chars in every column and when I click on a column, somehow have it expanded into an editbox?
>>
>>Appreciate the ideas and also the idea of how to handle adding new records with this interface that will be convenient for the user.
>>
>>Thanks in advance.
>
>
>Have an editbox in the grid with
>
>		.BorderStyle = 0
>		.Margin = 0
>		.BackStyle = 0
>
>
>
>and Column.Sparse = false
>
>
>The will display the contents, or part of the contents depending on the column width
>
>
>As to editing or viewing the full contents
>
>Then in the KeyPress of the editbox
>
>NODEFAULT
>
>(1) if it's a navigation key - handle it
>
>(2) If the field is readonly
>
>modify memo (m.this.ControlSource) NOEDIT NOMENU in (m.thisform.Name)
>
>
>
>(3) if the field is not readonly
>
>
>I f you have eg F7 to save
>
>push key
>on key label F7 keyboard '{CTRL+W}' PLAIN
>
>
>if there is nothing in the field and the key is between 0 and 255, following will enable the user to just start typing while the modify memo window will pop up
>
>
>
>
>KeyBoard chr(m.nKeyCode)
>
>
>
>
>
>modify memo (m.this.ControlSource) NOMENU in (m.thisform.Name)
>
>
>if the old value of the editbox is different from eval(m.this.ControlSource)
>
>=EditBox::Refresh()
>=m.this.ProgrammaticChange()
>
>
>If you pushed keys
>
>pop key
>
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform