Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grid will not accept input 1

Status
Not open for further replies.

gsfan

Technical User
May 20, 2005
22
0
0
US
Hi Guys,

This is a new one on me! I just constructed a rather meat and potatoes form with two grids in a one-to-many relationship. Grid2 is the child and grid1 the parent. The child grid will not accept any input in any of its four columns.

I have checked the usual suspects (ReadOnly, Enabled, and confirm if a child record exists where input is being attempted) and they are OK.

What should I be looking for here?

TIA

 
Thanks for the reply Geoff,

No, not as I understand RefInteg. That wouldn't be it, because this is occuring with records already in existence. In fact I haven't even got to the point yet of putting in the "Add New Record" method.

Any more ideas?

Thanks
 
OK, assuming that you have made absolutely sure that the Grid, it's columns and the entry controls the columns contain (such as Textboxes) are not Read Only or Disabled, and that there isn't any Return .F. or other code that could return .F. from any of the aforementioned controls' WHEN events. And assuming that you aren't getting any error messages or any other feedback about failed opertations etc when you are trying to edit the content. And assuming that you are using your own subclasses for any of the grid's contained controls that might have code in them that would exhibit this behavior. I would say that you have an anomoly here.

Ideas:

delete that grid and/or throw another one on that screen and see if the problem is fixed

Debug the application. Put a set step on in the got focus of one of the textboxes in the grid you are trying to step through.

Take the two grids and copy them over to a new form and see if it works.

Pack and rebuild your project

...it's a bit like playing the game battleship, but I've not heard of what you're describing. The ideas above are in no particular order... just start with the ideas that are the least destructive/least amount of work and rule them out one by one. If you're still having problems then we'll figure out something else. <g>

boyd.gif

 
Thanks for the reply, Craig.

I have chechked out all the possibilities you mentioned -- except one. And that is, I'm using VFP base classes, not my own subclasses. How would that do it? In the meantime I am going to go ahead and use the brute force debug list you've mentioned. Maybe I'll just start with a new grid.

Thank again.
 
I can imagine more reasons:

Grid.AllowCellSelection = .f.
Grid.AlowAddNew = .f.

Controls in the columns being Visible = .F. (which wouldn't really make them invisible but still disabled, even if .enabled =.t. and .readonly = .f.)

And last not least you've bound a cursor to it, which wasn't created by create cursor or SQL-Select ... READWRITE.

Bye, Olaf.
 
I finally figured out what was going on with this problem. In the ControlSource of each column I had placed the field name without its table-alias. I.e.

[fieldname] instead of [tablename].[fieldname]

When I added the alias name to the fields, input was accepted normally. (And when I removed it again, as a proof, it again failed to accept input.) This seems to be necessary at some times and not at others, because I have often (if not usually) used field names alone as ControlSource without any difficulty.

Thanks for all the input from the many.

Gil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top