>>Hi,
>>
>>>>Hi,
>>>>
>>>>I have a grid column (let's call it C1) whose controlsource is a character type field (from a local view).
>>>>The grid is desgined for display only (not to take input)
>>>>
>>>>Is it possible to conditionally display some of the values of C1 as indented (say prefix them with 3 space chars) without actually changing the value of the underlying field?
>>>>The condition is derived from another field in the same view as mentioned.
>>>
>>>Sure, you can put an expression in ControlSource ("myPrefix" + Table.Field). This makes the column readonly, but would work for you, as I understand.
>>
>>Just curious, what if the view needs to take user input...
>>Say the C1 contains a textbox, what can I do to achive the samething?
>
>Do you mean the predefined part to be user's input.
>
>In this case I think we need to set ControlSource in code
>
>thisform.cPrefix = 'our user input'
>
>thisform.grd1.Column1.ControlSource = "([" + thisform.cPrefix + "Table.Field" + "])"
>
>From the top of my head - not tested.
No... I mean the user will input whatever after the prefix (in C1 on the grid), i.e. user won't input the prefix, just the text after the prefix, and after the input is accepted, the grid will display it with a dummy prefix (thus won't change the actual value inputed by user). The underlying field value will remain whatever inputed by user... and whether or not the prefix will be added is depending on the value of another field in the same record.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only