Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid control not editable
Message
From
13/12/1997 14:23:20
George Alexander
Qatar Armed Forces
Doha, Qatar
 
 
To
13/12/1997 14:15:48
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00065520
Message ID:
00065770
Views:
54
>>>>>>>>Hi.
>>>>>>>>
>>>>>>>>Can anybody tell me why this happens to me alone.
>>>>>>>>
>>>>>>>>I have a form with the grid. When the user click add, then the underlying table of the grid
>>>>>>>>becomes a cursor created on the fly with one record containing the value of the key field.
>>>>>>>>If the first click I do is in the grid, it is editable. But after editing other controls of the form
>>>>>>>>if I click the grid, it is not editable. Can any body point out why so??
>>>>>>>>
>>>>>>>>Thanks
>>>>>>>>
>>>>>>>>alex
>>>>>>>
>>>>>>>Do you want to say that you use Cursor as Grid.Recordsource? If this cursor produced by Select-SQL command, then it's Read-Only and cannot be edited. If it's the case, you can change your code to get editable cursor (CREATE CURSOR / INSERT INTO).
>>>>>>
>>>>>>I am not able to send the reply to this as I have pressed some other button while the reply was being posted.
>>>>>>After that it was not taking any msg.
>>>>>>
>>>>>>My cursor is created using the creat cursor command. My grid is editable if I click the grid control first. But
>>>>>>if I come from another control of the form to the grid, it is not editable. The problem seems to be that the
>>>>>>created cursor is not the current selected area when I am in the grid. Where do I say that the current area for
>>>>>>the grid should be myCursor?
>>>>>>
>>>>>>thanks
>>>>>>
>>>>>>alex
>>>>>
>>>>>If Grid.Recordsoucre="tmpcursor" then grid itself will find its work area, if you didn't close cursor programmatically during form navigation. I think yoo could 'debug' this problem e.g. checking Grid.Recordsource from some Column.Control.Dblclick
>>>>
>>>>I checked the record source and it is showing correctly. This grid is editable if I fill it with at least 1 record and
>>>>then go and fill the parent record. Now if I comeback to the grid it is editable. But without first filling the grid
>>>>if I come back to it, it is not editable. I may be on the wrong track altogether.
>>>>
>>>>thank you for the reply
>>>>
>>>>alex
>>>
>>>Perhaps, I missed your point. I'm not familiar with your interface, and just can guess. What do you mean saying 'filling the grid'. Obviously, that you should have any recordsource (not empty) before start editing.
>>
>>The situation is like this. I have a form with a parent-child table. The child table is shown in the grid. When
>>the user wants to add a record, I change the control source of the parent table to the memory fields.(I am using
>>table buffering ). The grid has 2 combo in the first two cols and 3 other cols. In the click event of the add,
>>I create a cursor, append a blank record and fill the key value in the blank record. This is done after changing
>>the control source of the parent table controls to memory fields. Then the record source of the grid is changed
>>to that of the cursor. The form is displayed correctly. Now if I first click the 1st col the combo will come and
>>I can do my data entry as I expected. But if I fill the controls of the parent table and come to the grid to fill the
>>values, the grid becomes apparently read only meaning I am not able to fill the values. I dont know why this
>>is so.
>>
>>I hope I am clear . thanks for the reply
>>
>>alex
>
>Do you use DE temp relashionships or grid.linkmaster way to bring child grid? BTW, did you create this grid from scratch or used builder?
>It's not very reliable to change grid.recordsource on fly. Doing this you better reset programmatically column.controlsource too.

I have the parent-child relation in the DE. The grid is created not by using the builder. Before changing the
grid source, I store the col source and after change of the grid source, I restore the col source. The field names
of the control source is striped of the alias. I dont know this is what you asked?

Thanks

alex
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform