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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grid .Value property not working

Status
Not open for further replies.

prohbe

IS-IT--Management
Jun 5, 2009
3
US
Have a grid that keeps returning 0 in the .Value property.
The grid has a grid class and in the grid class I print the values of the grid properties in the AfterRowColchange code of that class.

The ActiveCol and ActiveRow are both returning correct values. The grid has to in-focus since I am putting the code in AfterRowColchange code of that class.

Any ideas.
Thanks
Pete
 
Hi Pete,

What value are you looking for? Is it the value of the current cell?

If so, you need to look at the Value property of the textbox (or other control) contained within the active column.

Or, better, look at the contents of the relevant field in the current record of the cursor or table that is bound to the grid. For example, to find the value of cell that contains ForeName, look in the ForeName field of the cursor.

At least, that's how I've always done it.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Grid.Value is a valid property that should work and works elsewhere but your right - more than one to skin a ====

Thanks
Pete
 
see help: For the Grid control, the Value property is available only when the Grid control has focus.

But it never even occurred to me to make use of the grid.value. I even don't know what it would reflect, if that eg is the value of the active cell.

It's quite useless if it's only having the value as long as the grid has the focus.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top