deleting the multiple rows in Grid
-
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 ); } }
-
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 ); } }
-
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 ); } }
Yes what grid control?
WhiteSky
-
Iam using CGrid control.in this iam facing the problem