void CDDBaseGrid::SetMultiColHeading(int col1, int row1, int col2, int row2, CString headingStr) { CUGCell cell; int res = JoinCells(col1, row1, col2, row2); GetCell(col1, row1, &cell); cell.SetCellTypeEx(UGCT_NORMALMULTILINE); SetCell(col1, row1, &cell); QuickSetText(col1, row1, headingStr); }
void CLayerTypeGrid::SetRowCellsToCheckBox(int row) { // Not the first column and not the last column, but all columns in between. int rowCnt = this->GetNumberRows(); int colCnt = this->GetNumberCols(); for (int colIndx = 1; colIndx < (colCnt-1); colIndx++) { CUGCell cell; GetCell(colIndx, row, &cell); cell.SetCellType(UGCT_CHECKBOX); // To make it a checkbox cell cell.SetCellTypeEx(UGCT_CHECKBOXCHECKMARK); // To make the checkbox use checkmark as opposed to cross mark. SetCell(colIndx, row, &cell); } }
void CNPBPSType1Grid::filter() { try { CMenu *pMnenu; pMnenu= GetPopupMenu(); if ( CNPBPSType1Grid::insertFilterFlag==0) { addItemToCombobox(); CNPBPSType1Grid::insertFilterFlag=1; InsertRow(0); for (int col_count=0;col_count<13;col_count++) { CUGCell cell; int row=0; int col=col_count; cell.ClearAll(); cell.SetCellType(UGCT_DROPLIST); cell.SetCellTypeEx(UGCT_DROPLISTHIDEBUTTON); cell.SetParam(CELLTYPE_IS_EDITABLE); QuickSetRange(col,row,col,row,&cell); QuickSetLabelText(col,row,str[col_count]); } pMnenu->CheckMenuItem(2001,MF_CHECKED); } else { DeleteRow(0); CNPBPSType1Grid::insertFilterFlag=0; pMnenu->CheckMenuItem(2001,MF_UNCHECKED); } RedrawAll(); } catch(_com_error & ce) { AfxMessageBox(ce.Description()+L" filter"); } }