Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. how to scroll MSflexgrid?

how to scroll MSflexgrid?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    panthal
    wrote on last edited by
    #1

    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

    C 1 Reply Last reply
    0
    • P 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

      C Offline
      C Offline
      chandu004
      wrote on last edited by
      #2

      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.

      P 1 Reply Last reply
      0
      • C chandu004

        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.

        P Offline
        P Offline
        panthal
        wrote on last edited by
        #3

        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

        C 1 Reply Last reply
        0
        • P panthal

          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

          C Offline
          C Offline
          chandu004
          wrote on last edited by
          #4

          wov thats wonderful. now it seems that, you are my guru. good and congrats.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups