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. deleting the multiple rows in Grid

deleting the multiple rows in Grid

Scheduled Pinned Locked Moved C / C++ / MFC
csshelptutorial
4 Posts 3 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.
  • R Offline
    R Offline
    reddy harish
    wrote on last edited by
    #1

    Hi Iam using Grid control in my application. how to delete the multiple rows in the Grid. currently if i select multiple rows to delete but the last selected row is getting deleted.here iam sending the code what i have used to delete the rows.but it is working pls any body can help in this CCellRange cRange; int nCount = 0; UINT unSel = 0; INT_PTR nSelctedDMItemsCount = 0; cRange = m_Grid.GetSelectedCellRange(); nCount = cRange.GetMaxRow(); bool bFlag = false; for(int nDMIdx = 1;nDMIdx < nCount;nDMIdx++) { bFlag =false; bFlag = m_Grid.IsCellSelected(nDMIdx,0); if(bFlag ) { m_Grid.DeleteRow( nDMIdx ); } }

    L H 2 Replies Last reply
    0
    • R reddy harish

      Hi Iam using Grid control in my application. how to delete the multiple rows in the Grid. currently if i select multiple rows to delete but the last selected row is getting deleted.here iam sending the code what i have used to delete the rows.but it is working pls any body can help in this CCellRange cRange; int nCount = 0; UINT unSel = 0; INT_PTR nSelctedDMItemsCount = 0; cRange = m_Grid.GetSelectedCellRange(); nCount = cRange.GetMaxRow(); bool bFlag = false; for(int nDMIdx = 1;nDMIdx < nCount;nDMIdx++) { bFlag =false; bFlag = m_Grid.IsCellSelected(nDMIdx,0); if(bFlag ) { m_Grid.DeleteRow( nDMIdx ); } }

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      reddy harish wrote:

      Hi Iam using Grid control

      What Grid Control?

      led mike

      R 1 Reply Last reply
      0
      • R reddy harish

        Hi Iam using Grid control in my application. how to delete the multiple rows in the Grid. currently if i select multiple rows to delete but the last selected row is getting deleted.here iam sending the code what i have used to delete the rows.but it is working pls any body can help in this CCellRange cRange; int nCount = 0; UINT unSel = 0; INT_PTR nSelctedDMItemsCount = 0; cRange = m_Grid.GetSelectedCellRange(); nCount = cRange.GetMaxRow(); bool bFlag = false; for(int nDMIdx = 1;nDMIdx < nCount;nDMIdx++) { bFlag =false; bFlag = m_Grid.IsCellSelected(nDMIdx,0); if(bFlag ) { m_Grid.DeleteRow( nDMIdx ); } }

        H Offline
        H Offline
        Hamid Taebi
        wrote on last edited by
        #3

        Yes what grid control?


        WhiteSky


        1 Reply Last reply
        0
        • L led mike

          reddy harish wrote:

          Hi Iam using Grid control

          What Grid Control?

          led mike

          R Offline
          R Offline
          reddy harish
          wrote on last edited by
          #4

          Iam using CGrid control.in this iam facing the problem

          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