how to bring required cell of msflexgrid within the viewable screen
i have populated msflexgride with perticular data, now on command buttun evend I want to search text from the gride. Coding duly seached but if the required text is below the screen then it does not scroll automatically so that searched item can be viewed. I have following code which search and color the text but does not scroll automatically to come the text in viewable area. Please advise any help.
If Gridbooking.Text = TextToSearch Then
Gridbooking.CellBackColor = vbYellow
ifornextitem = i
Exit Sub
Re: how to bring required cell of msflexgrid within the viewable screen
Just woke up.
I used the flexgrid for a few years, then about 10 years ago I switched to the free SGrid2.
It has a method for doing what you want, but that equivalent is not present in the flexgrid (not the same name).
I will knock up an example (for myself with enough data for me to experiment with), and I will find the command, if it kills me
Re: how to bring required cell of msflexgrid within the viewable screen
Are you using the MSFlexgrid or the MSHFlexgrid ?
I just cannibalised a Database loading project I had (not bound), and the TopRow and LeftCol worked for me. Both scrollbars have scrolled, and the desired cell is visible.
I will knock up a clean new version (no DB), and with clear cell identifiers, and attach it. I am using the MSFlexgrid, until I hear different from you
Last edited by Bobbles; Jun 20th, 2012 at 04:31 AM.
Re: how to bring required cell of msflexgrid within the viewable screen
Sir, you are absolutely right, your example is working properly. There is slight mistake at my end ie i am uing MSHFLEXGRID instead o MSFlex. Please advise what i should do now. I cannot change the gride because in my application lot of working has already been done.
Thanks a lot in advance.
Imran