3 replies
There is no way to do that. What you do instead (and this is a known hack) is that you get the coordinates of the cell you are attempting to edit, and position a textbox or combo box on top of it, which receives the focus and allows the user to edit the content. Once they finish editing, you programmatically update the value and refresh the grid.
Unfortunately, the code will not fit in here, so e-mail me at juanja01@optonline.net and I will be more than happy to give you sample code.
Good Luck!, and DONT FORGET to rate my answer >:)
by ytvsoftware
I use other technics then was described above. The method is more flexible and reliable and more easy to program. Create a modeless dialog with edit control or any things you prefer and make it child of your grid or other window or no parent at all depending on you needs. The main is use options making it system modal so it will keep focus. For moving and resizing the dialog and the edit control use SetWindowPosition.
The data entered in the edit box or other can be processed inside dialog or/and post/send by message in your application. Notify the dialog by messages or control directly about the changes related to the Grid. At some cases you can make modal dialog depending on your requirements toward data processing. Also it not always is nessasary to make edit control and dialog transparent. Sure it can be combined with
making it invisible etc. If you develop such way you find numerous reuses of such dialog. I personaly developed a set of flags for controling
of dialog for various purposes.
At some situations it can be combined with using of hooks. If it is important for you I can provide consulting.
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending