Click here to Skip to main content
15,891,849 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Im working with the Ultimate Grid Control.
I got a grid with has different r/o and r/w cells.
When the grid is first painted,
i want the User to have the first interaction (keystrokes)
to call startedit for a speciefic cell (2,2) in my sample.(to type in the name)

What I have tried:

Till now i have the StartEdit(2,2,0); Cell in the last line of OnSetup(),
but something "overrides" this command before the grid is shown
If i call the StartEdit(2,2,0); out of "OnDClicked", it works fine, just everytime i click, the edit"focus" starts in cell 2x2.

How can i get this fixed?
Posted
Updated 12-Mar-16 3:03am

1 solution

If you populate your grid control under OnSetup then that's not correct way of doig that
that event is used to configure grid control , register cell types etc..

you should add columns and rows in the parent class where you have created grid control

for example :
myGrid.Create()
myGrid.AddColumn()
myGrid.AddRow()
myGrid.StartEdit()


because grid becomes ready after OnSetup has returned
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900