Question

Is there a way to enable multiple selection of properties in a CMFCPropertyGridCtrl?

I want to manipulate several CMFCPropertyGridProperty together e.g. for deleting them.

Was it helpful?

Solution

yes you can do that Make column with check box and you can select with corresponding row. you can select multiple row also. make row with check box also.

for(int i=1;i<= Rowcount;i++) {

    GV_ITEM Item;
    Item.mask |= (GVNI_MODIFIED);
    if (!m_Grid.SetCellType(i,CheckColumn, RUNTIME_CLASS(CGridCellCheckCenter)))
        return;
    CGridCellCheckCenter *pCellCheck = (CGridCellCheckCenter*) m_Grid.GetCell(i,CheckColumn);       
    pCellCheck->SetCheck(false);
    pCellCheck = (CGridCellCheckCenter*) m_Grid.GetCell(i,CheckColumn);         
}

then you check the state of row and get the value of that multiple row. you can go through this site also if u needed http://www.codeproject.com/Articles/479/Tree-control-and-Buttons-for-MFC-Grid-control

OTHER TIPS

No! CMFCPropertyGridCtrl only allows a single selection.

I even have no idea what functionality you want to have with a multiple selection. You can only hit and change only one property. This is the same with the BCG controls.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top