how to scroll MSflexgrid?
-
hai all, could you please give me the code , how to scroll the flexgrid. just consider , if the flexgrid having 20 rows. at present only 10 rows are visible due to small dimensional flexgrid. if i want to highlight the 20th row , it is highlighting, but i can't able to see it. because 20th row is in the invisible portion of the flexgrid. so how to auto scroll the flexgrid to see the 20th (highlighted row) thanks panthal
-
hai all, could you please give me the code , how to scroll the flexgrid. just consider , if the flexgrid having 20 rows. at present only 10 rows are visible due to small dimensional flexgrid. if i want to highlight the 20th row , it is highlighting, but i can't able to see it. because 20th row is in the invisible portion of the flexgrid. so how to auto scroll the flexgrid to see the 20th (highlighted row) thanks panthal
hai, here i have some clue. to achieve your task, follow these steps. 1. in pretranslate message, write the following code. if(pMSg->hwnd==m_grid.m_hWnd) { if(pMsg->message==161) { int debug=0;//now put a break point here and debug the application. } } 2.run it in debug mode, and click the down portion of the dialog(i.e. for down scroll) now you will be taken to the code as specified in point 1. 3.now see the values of pmsg->wparam and lparam say for example x and y. 4.now, in the place, where you want to automatically scroll your grid, use the following code to scroll 1 cell. m_grid.SendMessage(161,x,y); i hope this logic is a bit confusing. but i tried it and it works. if you could understand the above, then this should work for you too. any more doubts, you are welcome.
-------------------------------------------- Suggestion to the members: Please prefix your main thread subject with [SOLVED] if it is solved. thanks. chandu.
-
hai, here i have some clue. to achieve your task, follow these steps. 1. in pretranslate message, write the following code. if(pMSg->hwnd==m_grid.m_hWnd) { if(pMsg->message==161) { int debug=0;//now put a break point here and debug the application. } } 2.run it in debug mode, and click the down portion of the dialog(i.e. for down scroll) now you will be taken to the code as specified in point 1. 3.now see the values of pmsg->wparam and lparam say for example x and y. 4.now, in the place, where you want to automatically scroll your grid, use the following code to scroll 1 cell. m_grid.SendMessage(161,x,y); i hope this logic is a bit confusing. but i tried it and it works. if you could understand the above, then this should work for you too. any more doubts, you are welcome.
-------------------------------------------- Suggestion to the members: Please prefix your main thread subject with [SOLVED] if it is solved. thanks. chandu.
-
USING THIS CODE i solved, grid membervariable.SetTopRow(row value); thank u my dear friend chandu, keep in touch. now i'am really happy. thanks a lot