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

TDBGrid Scroll To End

Status
Not open for further replies.

SpiderBear6

Programmer
Sep 17, 2003
422
AU
Hi guys,

I have functionality which can create a new field in a table. The whole table is visible in a True DBGrid control. When the user creates the field, the field's column is added to the end of the columns in the grid. I have been trying to get the grid to automatically scroll over to the right so that the new column is visible to the user. Does anyone have any ideas of how this can be done?

Cheers.

--------------------------------------
"We are star-stuff. We are the universe made manifest trying to figure itself out."
-- Delenn in Babylon 5 - "A Distant Star"
 
What happens if you set the active column to the last one?

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
How do I do that? There is a col property but this is read only at run time.

--------------------------------------
"We are star-stuff. We are the universe made manifest trying to figure itself out."
-- Delenn in Babylon 5 - "A Distant Star"
 
How about...only allowing focus to the new column.
Set Allow focus to uncheck on all other columns?
 
I still want them to be able to edit the other columns, I just want to scroll to the last column.

--------------------------------------
"We are star-stuff. We are the universe made manifest trying to figure itself out."
-- Delenn in Babylon 5 - "A Distant Star"
 
Since the grid layout(width) is determined in design mode,
on the form, I'm not sure how you could force it to go to the last column since the additional column is not know until the grid is loaded.

I havent used it but there is a "exposecellmode 1 scroll on edit" that might help you. Or email ComponentOne's support site.

Sorry,

If you find a way please post the solution

[blues]

 
Thanks for trying to help, WZUP. I'll send an email to ComponentOne support and if I get a good answer, will post it here.

Cheers.

--------------------------------------
"We are star-stuff. We are the universe made manifest trying to figure itself out."
-- Delenn in Babylon 5 - "A Distant Star"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top