1218 |
How can I save the changes, such as column's width, order
// Click event - Occurs when the user presses and then releases the left mouse button over the grid control. void OnClickGrid1() { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->PutLayout(L"Select=\"0\";SingleSort=\"C0:2\";Columns=1"); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->GetColumns()->Add(L"Column"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item 1"); var_Items->AddItem("Item 2"); var_Items->AddItem("Item 3"); spGrid1->EndUpdate(); |
1217 |
How can I add totals to groups without having to go through the AddGroupItem grid function
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->FreezeEvents(VARIANT_TRUE); spGrid1->BeginUpdate(); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutHeaderHeight(24); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); EXGRIDLib::IConditionalFormatsPtr var_ConditionalFormats = spGrid1->GetConditionalFormats(); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = var_ConditionalFormats->Add(L"%CT1",vtMissing); var_ConditionalFormat->PutForeColor(RGB(128,128,128)); var_ConditionalFormat->PutApplyTo(EXGRIDLib::FormatApplyToEnum(0x1)); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat1 = var_ConditionalFormats->Add(L"%CT2",vtMissing); var_ConditionalFormat1->PutForeColor(RGB(128,128,128)); var_ConditionalFormat1->PutApplyTo(EXGRIDLib::FormatApplyToEnum(0x2)); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat2 = var_ConditionalFormats->Add(L"%CT3",vtMissing); var_ConditionalFormat2->PutForeColor(RGB(128,128,128)); var_ConditionalFormat2->PutApplyTo(EXGRIDLib::FormatApplyToEnum(0x3)); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); var_Columns->Add(L"Description"); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Qty"))); var_Column->GetEditor()->PutEditType(EXGRIDLib::SpinType); var_Column->PutDef(EXGRIDLib::exTotalColumn,"sum(current,rec,%1)"); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Price"))); var_Column1->PutDef(EXGRIDLib::exTotalColumn,"avg(current,rec,%2)"); var_Column1->GetEditor()->PutEditType(EXGRIDLib::SpinType); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Amount"))); var_Column2->PutComputedField(L"%1 * %2"); var_Column2->PutDef(EXGRIDLib::exTotalColumn,"sum(current,rec,%3)"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long r = var_Items->AddItem("Root"); long g1 = var_Items->InsertItem(r,vtMissing,"Group 1"); long h = var_Items->InsertItem(g1,vtMissing,"Item 1"); var_Items->PutCellValue(h,long(1),long(1)); var_Items->PutCellValue(h,long(2),long(10)); h = var_Items->InsertItem(g1,vtMissing,"Item 2"); var_Items->PutCellValue(h,long(1),long(2)); var_Items->PutCellValue(h,long(2),long(11)); long g2 = var_Items->InsertItem(r,vtMissing,"Group 2"); h = var_Items->InsertItem(g2,vtMissing,"Item 1"); var_Items->PutCellValue(h,long(1),long(3)); var_Items->PutCellValue(h,long(2),long(12)); h = var_Items->InsertItem(g2,vtMissing,"Item 2"); var_Items->PutCellValue(h,long(1),long(4)); var_Items->PutCellValue(h,long(2),long(13)); var_Items->PutExpandItem(0,VARIANT_TRUE); spGrid1->EndUpdate(); spGrid1->FreezeEvents(VARIANT_FALSE); |
1216 |
How can I configure the filters in the text columns to search by content
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarPromptVisible); spGrid1->PutHeaderAppearance(EXGRIDLib::None2); spGrid1->PutFilterBarPromptType(EXGRIDLib::exFilterPromptContainsAll); spGrid1->GetColumns()->Add(L"Names"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Mantel"); var_Items->AddItem("Mechanik"); var_Items->AddItem("Motor"); var_Items->AddItem("Murks"); var_Items->AddItem("Märchen"); var_Items->AddItem("Möhren"); var_Items->AddItem("Mühle"); var_Items->AddItem("Sérigraphie"); spGrid1->PutFilterBarPromptPattern(L"a"); spGrid1->EndUpdate(); |
1215 |
How can I display the control's captions in Spanish
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarPromptVisible); spGrid1->PutHeaderAppearance(EXGRIDLib::None2); spGrid1->PutDescription(EXGRIDLib::exFilterBarAll,L"(todo) "); spGrid1->PutDescription(EXGRIDLib::exFilterBarFilterForCaption,L"filtrar por..."); spGrid1->PutFilterBarPrompt(L"<i><fgcolor=808080>iniciar filtro...</fgcolor></i>"); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Names"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXGRIDLib::exPattern); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Mantel"); var_Items->AddItem("Mechanik"); var_Items->AddItem("Motor"); var_Items->AddItem("Murks"); var_Items->AddItem("Märchen"); var_Items->AddItem("Möhren"); var_Items->AddItem("Mühle"); var_Items->AddItem("Sérigraphie"); spGrid1->EndUpdate(); |
1214 |
How can I zoom in the control
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); _bstr_t s1 = 16; _variant_t s2 = spGrid1->FormatABC(L"2 * value",s1,vtMissing,vtMissing); spGrid1->PutImageSize(s2); spGrid1->PutDefaultItemHeight(s2); spGrid1->PutHeaderHeight(s2); spGrid1->PutSortBarHeight(s2); spGrid1->PutIndent(s2); spGrid1->GetFont()->PutSize(_variant_t(s1)); spGrid1->GetFilterBarFont()->PutSize(_variant_t(s1)); spGrid1->GetToolTipFont()->PutSize(_variant_t(s1)); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarPromptVisible); spGrid1->PutHeaderAppearance(EXGRIDLib::None2); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Names"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXGRIDLib::exPattern); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Mantel"); var_Items->AddItem("Mechanik"); var_Items->AddItem("Motor"); var_Items->AddItem("Murks"); var_Items->AddItem("Märchen"); var_Items->AddItem("Möhren"); var_Items->AddItem("Mühle"); var_Items->AddItem("Sérigraphie"); spGrid1->EndUpdate(); |
1213 |
Can I set a filter that automatically adds a * before and after the word, so the user can just search for 'cat' and it becomes '*cat*' automatically
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutHeaderHeight(24); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Items"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutDisplayFilterPattern(VARIANT_TRUE); var_Column->PutDef(EXGRIDLib::exFilterPatternTemplate,"*<%filter%>*"); var_Column->PutFilterType(EXGRIDLib::exPattern); var_Column->PutFilter(L"1"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); spGrid1->ApplyFilter(); spGrid1->EndUpdate(); |
1212 |
The fine dotted lines in the control appear much thicker than the standard ones we've been using. How can we fix this
|
1211 |
Load data as a tree using a parent-id relationship
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutColumnAutoResize(VARIANT_FALSE); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutHeaderHeight(24); spGrid1->PutDrawGridLines(EXGRIDLib::exVLines); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library' #import <msado15.dll> rename("EOF","REOF") */ ADODB::_RecordsetPtr rs = ::CreateObject(L"ADODB.Recordset"); rs->Open("Select * FROM Employees WHERE 1=0","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.mdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0); spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs))); spGrid1->GetColumns()->GetItem(long(0))->PutWidth(128); rs = ::CreateObject(L"ADODB.Recordset"); rs->Open("Employees","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.mdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0); spGrid1->PutItems(rs->GetRows(0,vtMissing,vtMissing),";0;17"); spGrid1->GetItems()->PutExpandItem(0,VARIANT_TRUE); spGrid1->EndUpdate(); |
1210 |
Is there a way to change the contents of the drop down editor based on a value in another column
// AddItem event - Occurs after a new Item has been inserted to Items collection. void OnAddItemGrid1(long Item) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetItems()->PutCellEditorVisible(Item,long(0),EXGRIDLib::exEditorVisible); spGrid1->GetItems()->PutCellEditorVisible(Item,long(1),EXGRIDLib::exEditorVisible); } // EditOpen event - Occurs when the edit operation starts. void OnEditOpenGrid1() { EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); _variant_t v = var_Items->GetCellValue(var_Items->GetFocusItem(),long(0)); _bstr_t c = var_Items->GetCellCaption(var_Items->GetFocusItem(),long(0)); EXGRIDLib::IEditorPtr var_Editor = spGrid1->GetColumns()->GetItem(long(1))->GetEditor(); var_Editor->ClearItems(); var_Editor->AddItem(v,L"c",vtMissing); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutHeaderHeight(24); spGrid1->PutGridLineStyle(EXGRIDLib::exGridLinesGeometric); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"DropDownList"))); EXGRIDLib::IEditorPtr var_Editor = var_Column->GetEditor(); var_Editor->PutEditType(EXGRIDLib::DropDownListType); var_Editor->AddItem(1,L"First",vtMissing); var_Editor->AddItem(2,L"Second",vtMissing); var_Editor->AddItem(3,L"Third",vtMissing); spGrid1->PutDrawGridLines(EXGRIDLib::exAllLines); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"DropDownList-Related")))->GetEditor()->PutEditType(EXGRIDLib::DropDownListType); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem(long(1)),long(1),long(-1)); var_Items->PutCellValue(var_Items->AddItem(long(2)),long(1),long(-1)); var_Items->PutCellValue(var_Items->AddItem(long(3)),long(1),long(-1)); var_Items->PutLockedItemCount(EXGRIDLib::exBottom,1); long h = var_Items->GetLockedItem(EXGRIDLib::exBottom,0); var_Items->PutItemDivider(h,0); var_Items->PutItemDividerLineAlignment(h,EXGRIDLib::DividerTop); var_Items->PutCellEditorVisible(h,long(0),EXGRIDLib::exEditorHidden); var_Items->PutCellSingleLine(h,long(0),EXGRIDLib::exCaptionWordWrap); var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::exHTML); var_Items->PutCellValue(h,long(0),_bstr_t("The drop down editor in the second column is filled during the <b>EditOpen event</b>, and the values are based on the selection") + " on the first column."); spGrid1->EndUpdate(); |
1209 |
Highlight the editable fields
// Change event - Occurs when the user changes the cell's content. void OnChangeGrid1(long Item,long ColIndex,VARIANT FAR* NewValue) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->Refresh(); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->FreezeEvents(VARIANT_TRUE); spGrid1->BeginUpdate(); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutHeaderHeight(24); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); EXGRIDLib::IConditionalFormatsPtr var_ConditionalFormats = spGrid1->GetConditionalFormats(); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = var_ConditionalFormats->Add(L"%CE1",vtMissing); var_ConditionalFormat->PutBold(VARIANT_TRUE); var_ConditionalFormat->PutBackColor(RGB(245,245,245)); var_ConditionalFormat->PutApplyTo(EXGRIDLib::FormatApplyToEnum(0x1)); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat1 = var_ConditionalFormats->Add(L"%CE2",vtMissing); var_ConditionalFormat1->PutBold(VARIANT_TRUE); var_ConditionalFormat1->PutBackColor(RGB(245,245,245)); var_ConditionalFormat1->PutApplyTo(EXGRIDLib::FormatApplyToEnum(0x2)); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat2 = var_ConditionalFormats->Add(L"%CE3",vtMissing); var_ConditionalFormat2->PutBold(VARIANT_TRUE); var_ConditionalFormat2->PutBackColor(RGB(245,245,245)); var_ConditionalFormat2->PutApplyTo(EXGRIDLib::FormatApplyToEnum(0x3)); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); var_Columns->Add(L"Description"); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Qty"))); var_Column->GetEditor()->PutEditType(EXGRIDLib::SpinType); var_Column->PutDef(EXGRIDLib::exTotalColumn,"sum(current,rec,%1)"); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Price"))); var_Column1->PutDef(EXGRIDLib::exTotalColumn,"avg(current,rec,%2)"); var_Column1->GetEditor()->PutEditType(EXGRIDLib::SpinType); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Amount"))); var_Column2->PutComputedField(L"%1 * %2"); var_Column2->PutDef(EXGRIDLib::exTotalColumn,"sum(current,rec,%3)"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long r = var_Items->AddItem("Root"); long g1 = var_Items->InsertItem(r,vtMissing,"Group 1"); long h = var_Items->InsertItem(g1,vtMissing,"Item 1"); var_Items->PutCellValue(h,long(1),long(1)); var_Items->PutCellValue(h,long(2),long(10)); h = var_Items->InsertItem(g1,vtMissing,"Item 2"); var_Items->PutCellValue(h,long(1),long(2)); var_Items->PutCellValue(h,long(2),long(11)); long g2 = var_Items->InsertItem(r,vtMissing,"Group 2"); h = var_Items->InsertItem(g2,vtMissing,"Item 1"); var_Items->PutCellValue(h,long(1),long(3)); var_Items->PutCellValue(h,long(2),long(12)); h = var_Items->InsertItem(g2,vtMissing,"Item 2"); var_Items->PutCellValue(h,long(1),long(4)); var_Items->PutCellValue(h,long(2),long(13)); var_Items->PutExpandItem(0,VARIANT_TRUE); spGrid1->EndUpdate(); spGrid1->FreezeEvents(VARIANT_FALSE); |
1208 |
Highlight the total fields
// Change event - Occurs when the user changes the cell's content. void OnChangeGrid1(long Item,long ColIndex,VARIANT FAR* NewValue) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->Refresh(); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->FreezeEvents(VARIANT_TRUE); spGrid1->BeginUpdate(); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutHeaderHeight(24); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); EXGRIDLib::IConditionalFormatsPtr var_ConditionalFormats = spGrid1->GetConditionalFormats(); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = var_ConditionalFormats->Add(L"%CT1",vtMissing); var_ConditionalFormat->PutForeColor(RGB(128,128,128)); var_ConditionalFormat->PutApplyTo(EXGRIDLib::FormatApplyToEnum(0x1)); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat1 = var_ConditionalFormats->Add(L"%CT2",vtMissing); var_ConditionalFormat1->PutForeColor(RGB(128,128,128)); var_ConditionalFormat1->PutApplyTo(EXGRIDLib::FormatApplyToEnum(0x2)); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat2 = var_ConditionalFormats->Add(L"%CT3",vtMissing); var_ConditionalFormat2->PutForeColor(RGB(128,128,128)); var_ConditionalFormat2->PutApplyTo(EXGRIDLib::FormatApplyToEnum(0x3)); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); var_Columns->Add(L"Description"); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Qty"))); var_Column->GetEditor()->PutEditType(EXGRIDLib::SpinType); var_Column->PutDef(EXGRIDLib::exTotalColumn,"sum(current,rec,%1)"); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Price"))); var_Column1->PutDef(EXGRIDLib::exTotalColumn,"avg(current,rec,%2)"); var_Column1->GetEditor()->PutEditType(EXGRIDLib::SpinType); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Amount"))); var_Column2->PutComputedField(L"%1 * %2"); var_Column2->PutDef(EXGRIDLib::exTotalColumn,"sum(current,rec,%3)"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long r = var_Items->AddItem("Root"); long g1 = var_Items->InsertItem(r,vtMissing,"Group 1"); long h = var_Items->InsertItem(g1,vtMissing,"Item 1"); var_Items->PutCellValue(h,long(1),long(1)); var_Items->PutCellValue(h,long(2),long(10)); h = var_Items->InsertItem(g1,vtMissing,"Item 2"); var_Items->PutCellValue(h,long(1),long(2)); var_Items->PutCellValue(h,long(2),long(11)); long g2 = var_Items->InsertItem(r,vtMissing,"Group 2"); h = var_Items->InsertItem(g2,vtMissing,"Item 1"); var_Items->PutCellValue(h,long(1),long(3)); var_Items->PutCellValue(h,long(2),long(12)); h = var_Items->InsertItem(g2,vtMissing,"Item 2"); var_Items->PutCellValue(h,long(1),long(4)); var_Items->PutCellValue(h,long(2),long(13)); var_Items->PutExpandItem(0,VARIANT_TRUE); spGrid1->EndUpdate(); spGrid1->FreezeEvents(VARIANT_FALSE); |
1207 |
Highlight the leaf items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->GetConditionalFormats()->Add(L"%CC0=0",vtMissing)->PutForeColor(RGB(128,128,128)); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutHeaderHeight(24); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Item")))->PutWidth(16); var_Columns->Add(L"Desc"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long hR = var_Items->AddItem("Root"); var_Items->PutCellValue(hR,long(1),"The root directory /"); var_Items->PutExpandItem(hR,VARIANT_TRUE); long h = var_Items->InsertItem(hR,vtMissing,"Home"); var_Items->PutCellValue(h,long(1),"The home directory with user directories Alice and Bob"); var_Items->InsertItem(h,vtMissing,"Alice"); var_Items->InsertItem(h,vtMissing,"Bob"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->InsertItem(hR,vtMissing,"Etc"); var_Items->PutCellValue(h,long(1),"The etc directory with one configuration file"); h = var_Items->InsertItem(h,vtMissing,"nginx.conf"); var_Items->PutCellValue(var_Items->InsertItem(hR,vtMissing,"Var"),long(1),"The var directory"); spGrid1->EndUpdate(); |
1206 |
Highlight the parent items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->GetConditionalFormats()->Add(L"%CC0",vtMissing)->PutForeColor(RGB(255,0,0)); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutHeaderHeight(24); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Item")))->PutWidth(16); var_Columns->Add(L"Desc"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long hR = var_Items->AddItem("Root"); var_Items->PutCellValue(hR,long(1),"The root directory /"); var_Items->PutExpandItem(hR,VARIANT_TRUE); long h = var_Items->InsertItem(hR,vtMissing,"Home"); var_Items->PutCellValue(h,long(1),"The home directory with user directories Alice and Bob"); var_Items->InsertItem(h,vtMissing,"Alice"); var_Items->InsertItem(h,vtMissing,"Bob"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->InsertItem(hR,vtMissing,"Etc"); var_Items->PutCellValue(h,long(1),"The etc directory with one configuration file"); h = var_Items->InsertItem(h,vtMissing,"nginx.conf"); var_Items->PutCellValue(var_Items->InsertItem(hR,vtMissing,"Var"),long(1),"The var directory"); spGrid1->EndUpdate(); |
1205 |
Highlight the item being expanded or collapsed
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->GetConditionalFormats()->Add(L"%CX0",vtMissing)->PutBold(VARIANT_TRUE); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutHeaderHeight(24); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Item")))->PutWidth(16); var_Columns->Add(L"Desc"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long hR = var_Items->AddItem("Root"); var_Items->PutCellValue(hR,long(1),"The root directory /"); var_Items->PutExpandItem(hR,VARIANT_TRUE); long h = var_Items->InsertItem(hR,vtMissing,"Home"); var_Items->PutCellValue(h,long(1),"The home directory with user directories Alice and Bob"); var_Items->InsertItem(h,vtMissing,"Alice"); var_Items->InsertItem(h,vtMissing,"Bob"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->InsertItem(hR,vtMissing,"Etc"); var_Items->PutCellValue(h,long(1),"The etc directory with one configuration file"); h = var_Items->InsertItem(h,vtMissing,"nginx.conf"); var_Items->PutCellValue(var_Items->InsertItem(hR,vtMissing,"Var"),long(1),"The var directory"); spGrid1->EndUpdate(); |
1204 |
I am using exTotalColumn. Is there an option to exclude specific cells to display the total
// Change event - Occurs when the user changes the cell's content. void OnChangeGrid1(long Item,long ColIndex,VARIANT FAR* NewValue) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->Refresh(); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->FreezeEvents(VARIANT_TRUE); spGrid1->BeginUpdate(); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutHeaderHeight(24); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); var_Columns->Add(L"Description"); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Qty"))); var_Column->GetEditor()->PutEditType(EXGRIDLib::SpinType); var_Column->PutDef(EXGRIDLib::exTotalColumn,"sum(current,rec,%1)"); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Price"))); var_Column1->PutDef(EXGRIDLib::exTotalColumn,"avg(current,rec,%2)"); var_Column1->GetEditor()->PutEditType(EXGRIDLib::SpinType); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Amount"))); var_Column2->PutComputedField(L"%1 * %2"); var_Column2->PutDef(EXGRIDLib::exTotalColumn,"sum(current,rec,%3)"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long r = var_Items->AddItem("Root"); long g1 = var_Items->InsertItem(r,vtMissing,"Group 1"); var_Items->PutFormatCell(g1,long(2),L"`<average missing>`"); var_Items->PutCellEditorVisible(g1,long(2),EXGRIDLib::exEditorHidden); var_Items->PutCellBold(g1,long(2),VARIANT_TRUE); var_Items->PutCellForeColor(g1,long(2),RGB(255,0,0)); long h = var_Items->InsertItem(g1,vtMissing,"Item 1"); var_Items->PutCellValue(h,long(1),long(1)); var_Items->PutCellValue(h,long(2),long(10)); h = var_Items->InsertItem(g1,vtMissing,"Item 2"); var_Items->PutCellValue(h,long(1),long(2)); var_Items->PutCellValue(h,long(2),long(11)); long g2 = var_Items->InsertItem(r,vtMissing,"Group 2"); h = var_Items->InsertItem(g2,vtMissing,"Item 1"); var_Items->PutCellValue(h,long(1),long(3)); var_Items->PutCellValue(h,long(2),long(12)); h = var_Items->InsertItem(g2,vtMissing,"Item 2"); var_Items->PutCellValue(h,long(1),long(4)); var_Items->PutCellValue(h,long(2),long(13)); var_Items->PutExpandItem(0,VARIANT_TRUE); spGrid1->EndUpdate(); spGrid1->FreezeEvents(VARIANT_FALSE); |
1203 |
How can I add a total column
// Change event - Occurs when the user changes the cell's content. void OnChangeGrid1(long Item,long ColIndex,VARIANT FAR* NewValue) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->Refresh(); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->FreezeEvents(VARIANT_TRUE); spGrid1->BeginUpdate(); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutHeaderHeight(24); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); var_Columns->Add(L"Description"); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Qty"))); var_Column->GetEditor()->PutEditType(EXGRIDLib::SpinType); var_Column->PutDef(EXGRIDLib::exTotalColumn,"sum(current,rec,%1)"); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Price"))); var_Column1->PutDef(EXGRIDLib::exTotalColumn,"avg(current,rec,%2)"); var_Column1->GetEditor()->PutEditType(EXGRIDLib::SpinType); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Amount"))); var_Column2->PutComputedField(L"%1 * %2"); var_Column2->PutDef(EXGRIDLib::exTotalColumn,"sum(current,rec,%3)"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long r = var_Items->AddItem("Root"); long g1 = var_Items->InsertItem(r,vtMissing,"Group 1"); long h = var_Items->InsertItem(g1,vtMissing,"Item 1"); var_Items->PutCellValue(h,long(1),long(1)); var_Items->PutCellValue(h,long(2),long(10)); h = var_Items->InsertItem(g1,vtMissing,"Item 2"); var_Items->PutCellValue(h,long(1),long(2)); var_Items->PutCellValue(h,long(2),long(11)); long g2 = var_Items->InsertItem(r,vtMissing,"Group 2"); h = var_Items->InsertItem(g2,vtMissing,"Item 1"); var_Items->PutCellValue(h,long(1),long(3)); var_Items->PutCellValue(h,long(2),long(12)); h = var_Items->InsertItem(g2,vtMissing,"Item 2"); var_Items->PutCellValue(h,long(1),long(4)); var_Items->PutCellValue(h,long(2),long(13)); var_Items->PutExpandItem(0,VARIANT_TRUE); spGrid1->EndUpdate(); spGrid1->FreezeEvents(VARIANT_FALSE); |
1202 |
Is it possible to disable sizing(size) the column
|
1201 |
How can I add two columns of 25% and the third of 50%
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutDrawGridLines(EXGRIDLib::exVLines); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"25%")))->PutWidth(25); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"25%")))->PutWidth(25); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"50%")))->PutWidth(50); spGrid1->PutColumnAutoResize(VARIANT_TRUE); spGrid1->EndUpdate(); |
1200 |
I add two columns but I see a third column
|
1199 |
I lose the hierarchy, all items are on the same 1st level, while I use PutItems
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); spGrid1->GetColumns()->Add(L"C1"); spGrid1->GetColumns()->Add(L"C2"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem("Emily"),long(1),"William"); var_Items->PutCellValue(var_Items->AddItem("Sophia"),long(1),"Alexander"); spGrid1->PutItems(spGrid1->GetItems(""),spGrid1->GetItems()->GetItemByIndex(0)); spGrid1->PutItems(spGrid1->GetItems(""),spGrid1->GetItems()->GetItemByIndex(1)); spGrid1->PutItems(spGrid1->GetItems(""),spGrid1->GetItems()->GetItemByIndex(6)); spGrid1->GetItems()->PutExpandItem(0,VARIANT_TRUE); spGrid1->EndUpdate(); |
1198 |
Column width set by code is ignored or it seems that does not work
|
1197 |
I want to display this computed value in a TextBox outside the grid and get it updated with any change of its value. How can this be done
// Change event - Occurs when the user changes the cell's content. void OnChangeGrid1(long Item,long ColIndex,VARIANT FAR* NewValue) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->Refresh(); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); OutputDebugStringW( L"Total: " ); OutputDebugStringW( var_Items->GetCellCaption(var_Items->GetLockedItem(EXGRIDLib::exTop,0),long(0)) ); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Numbers"))); EXGRIDLib::IEditorPtr var_Editor = var_Column->GetEditor(); var_Editor->PutNumeric(EXGRIDLib::exInteger); var_Editor->PutEditType(EXGRIDLib::SpinType); var_Column->PutSortType(EXGRIDLib::SortNumeric); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutLockedItemCount(EXGRIDLib::exTop,1); long h = var_Items->GetLockedItem(EXGRIDLib::exTop,0); var_Items->PutItemBackColor(h,RGB(240,240,240)); var_Items->PutCellValue(h,long(0),"sum(all,dir,dbl(%0))"); var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::exTotalField); var_Items->PutCellHAlignment(h,long(0),EXGRIDLib::RightAlignment); var_Items->PutFormatCell(h,long(0),L"'Total: '+value"); EXGRIDLib::IItemsPtr var_Items1 = spGrid1->GetItems(); var_Items1->AddItem(long(10)); var_Items1->AddItem(long(25)); var_Items1->AddItem(long(31)); var_Items1->AddItem(long(48)); spGrid1->EndUpdate(); |
1196 |
Disable temporarily the column's sort, resize and drag and drop
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutSortBarVisible(VARIANT_TRUE); spGrid1->PutSortBarCaption(L"<fgcolor 808080><c>the header and the sort-bar are disabled (no drag and drop is allowed)"); spGrid1->PutAllowGroupBy(VARIANT_TRUE); spGrid1->PutHeaderEnabled(VARIANT_FALSE); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Index")))->PutFormatColumn(L"1 index ``"); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos")))->PutFormatColumn(L"1 apos ``"); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Edit")))->GetEditor()->PutEditType(EXGRIDLib::EditType); spGrid1->PutGridLineStyle(EXGRIDLib::exGridLinesGeometric); spGrid1->PutDrawGridLines(EXGRIDLib::exVLines); spGrid1->PutGridLineColor(RGB(224,224,224)); spGrid1->EndUpdate(); |
1195 |
I wonder if it’s possible to highlight/select a column like Excel
// ColumnClick event - Fired after the user clicks on column's header. void OnColumnClickGrid1(LPDISPATCH Column) { // Column.Selected = True // FocusColumnIndex = Column.Index /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->GetItem(long(0))->PutSelected(VARIANT_FALSE); spGrid1->GetColumns()->GetItem(long(1))->PutSelected(VARIANT_FALSE); spGrid1->GetColumns()->GetItem(long(2))->PutSelected(VARIANT_FALSE); spGrid1->GetItems()->SelectAll(); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutBackground(EXGRIDLib::exCursorHoverColumn,-1); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutMarkSearchColumn(VARIANT_FALSE); spGrid1->PutSingleSel(VARIANT_FALSE); spGrid1->PutFullRowSelect(EXGRIDLib::exRectSel); spGrid1->PutSortOnClick(EXGRIDLib::exNoSort); spGrid1->GetColumns()->Add(L"Column1"); spGrid1->GetColumns()->Add(L"Column2"); spGrid1->GetColumns()->Add(L"Column3"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutDefaultItem(var_Items->AddItem(long(0))); var_Items->PutCellValue(long(0),long(1),long(1)); var_Items->PutCellValue(long(0),long(2),long(2)); var_Items->PutDefaultItem(var_Items->AddItem(long(3))); var_Items->PutCellValue(long(0),long(1),long(4)); var_Items->PutCellValue(long(0),long(2),long(5)); var_Items->PutDefaultItem(var_Items->AddItem(long(6))); var_Items->PutCellValue(long(0),long(1),long(7)); var_Items->PutCellValue(long(0),long(2),long(8)); spGrid1->EndUpdate(); |
1194 |
Is it possible to change the color of the border
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->GetVisualAppearance()->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABc8IQAAYAQGKIcBiAKBQAGaAoDDMMwyQwAAxDMK8EwsACEIrjKCRShyCYZRhGcTALBIBQSHAZZKgOJIRDENg2SANACRfIUaw1DqBZwkGZoW") + "hGKgAShIEDwSKkQBlECeJpnKaqIomJYnDLQUw0NL9HQ3JaaKqnWLBVCWEQyVzEIyjBT0EzHMqtKrjaA6NpaP4oT7LEIydKFCRJNi0bSnGqaOj6UJSURRVq3TTFcTyAC3" + "ahuOo4cpXB4SWrOd41fYNOTQACzbCsSIcPxCe6GXjiNwjPKMWhnIq+M5wXIrJyKCYUaTcejzfgdU5XWqeMoyewMXxmZqbXw/fBYRrEL5vTqNXTzSA4BEB"); spGrid1->PutAppearance(EXGRIDLib::AppearanceEnum(0x100ff00)); spGrid1->PutColumnAutoResize(VARIANT_TRUE); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutTreeColumnIndex(-1); spGrid1->PutDrawGridLines(EXGRIDLib::exAllLines); spGrid1->PutGridLineStyle(EXGRIDLib::exGridLinesGeometric); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("before item"); var_Items->AddItem("item"); var_Items->AddItem("after item"); spGrid1->EndUpdate(); |
1193 |
Expandable-caption
// AnchorClick event - Occurs when an anchor element is clicked. void OnAnchorClickGrid1(LPCTSTR AnchorID,LPCTSTR Options) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); OutputDebugStringW( L"AnchorID" ); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutColumnAutoResize(VARIANT_TRUE); spGrid1->PutTreeColumnIndex(-1); spGrid1->PutDrawGridLines(EXGRIDLib::exAllLines); spGrid1->PutGridLineStyle(EXGRIDLib::exGridLinesGeometric); spGrid1->PutBackColorAlternate(RGB(240,240,240)); spGrid1->PutShowFocusRect(VARIANT_FALSE); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("before item"); long h = var_Items->AddItem(_bstr_t("<solidline> <c><b>Bank Account</b></solidline><br>+ owner: String <r><a 1;e64=gA8ABzABvABsABpABkg8JABuABlAA+AAgAECMcTi4AMwAM4Aj") + "MGhEGOUVAA4AAwk8plcqihwAElg0wiUlOkOiUEgQvgcFhsKhkIhUQiUUnccj0gn0jmMagUlowAMNOpEfkMNkkmlEqrctjQmAAjAA5AA2sssHcbnkdq1Ln1QtVSjQAAEB" + "A==>▲</a><br><solidline>+ balance: Currency = 0</solidline><br>+ deposit(amount: Currency)<r><a 2;e64=gA8ABjAA+AECMwAM8DAB" + "vABshoAOQAEAAHAAGEWjEajMGNoAMoAOgANERMgAOcHAAvAEJhcEh0Qh0Tg0CmkqMMFlUuhkxiMTisXjNCjk6EwAEYAHIAG1MjY7lUsnkwh8/nUClk5gwAAEBA==> " + "650;</a><br>+ withdraw(amount: Currency)"); var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::exHTML); var_Items->PutCellSingleLine(h,long(0),EXGRIDLib::exCaptionWordWrap); var_Items->AddItem("after item"); spGrid1->EndUpdate(); |
1192 |
Expandable-caption
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutColumnAutoResize(VARIANT_TRUE); spGrid1->PutTreeColumnIndex(-1); spGrid1->PutDrawGridLines(EXGRIDLib::exAllLines); spGrid1->PutGridLineStyle(EXGRIDLib::exGridLinesGeometric); spGrid1->PutBackColorAlternate(RGB(240,240,240)); spGrid1->PutShowFocusRect(VARIANT_FALSE); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("before item"); long h = var_Items->AddItem("<solidline><b>Header</b></solidline><br>Line1<r><a ;exp=show lines>+</a><br>Line2<br>Line3"); var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::exHTML); var_Items->PutCellSingleLine(h,long(0),EXGRIDLib::exCaptionWordWrap); var_Items->AddItem("after item"); spGrid1->EndUpdate(); |
1191 |
Force hover-all feature
|
1190 |
Disable hover-all feature (Windows 11 or greater)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->PutBackground(EXGRIDLib::exScrollHoverAll,RGB(1,0,0)); |
1189 |
Display a custom tooltip
|
1188 |
Shows the tooltip of the object moved relative to its default position
|
1187 |
Delete all records
// ButtonClick event - Occurs when user clicks on the cell's button. void OnButtonClickGrid1(long Item,long ColIndex,VARIANT Key) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library' #import <msado15.dll> rename("EOF","REOF") */ ADODB::_CommandPtr cmd = ::CreateObject(L"ADODB.Command"); cmd->PutActiveConnection(((ADODB::_ConnectionPtr)(((ADODB::_RecordsetPtr)(spGrid1->GetDataSource()))->GetActiveConnection()))); cmd->PutCommandText(L"Delete * from ORDERS"); cmd->PutCommandType(ADODB::adCmdText); cmd->Execute(vtMissing,vtMissing,0); ((ADODB::_RecordsetPtr)(spGrid1->GetDataSource()))->Requery(0); } // Error event - Fired when an internal error occurs. void OnErrorGrid1(long Error,LPCTSTR Description) { EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); OutputDebugStringW( L"Description" ); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutColumnAutoResize(VARIANT_FALSE); ADODB::_RecordsetPtr rs = ::CreateObject(L"ADODB.Recordset"); rs->Open("Select * From Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenKeyset,ADODB::adLockOptimistic,0); spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs))); spGrid1->GetConditionalFormats()->Add(L"%1=12345",vtMissing)->PutBackColor(RGB(240,240,240)); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutLockedItemCount(EXGRIDLib::exTop,1); long h = var_Items->GetLockedItem(EXGRIDLib::exTop,0); var_Items->PutItemDivider(h,0); var_Items->PutCellHasButton(h,long(0),VARIANT_TRUE); var_Items->PutCellValue(h,long(0),"Requery (delete all records, using ADODB.Command)"); var_Items->PutCellHAlignment(h,long(0),EXGRIDLib::CenterAlignment); spGrid1->EndUpdate(); |
1186 |
How can I get a cell that shows the sum of a column of minutes in hours + minutes format
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Minutes"))); var_Column->PutSortType(EXGRIDLib::SortNumeric); EXGRIDLib::IEditorPtr var_Editor = var_Column->GetEditor(); var_Editor->PutEditType(EXGRIDLib::EditType); var_Editor->PutNumeric(EXGRIDLib::exInteger); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem(long(10)); var_Items->AddItem(long(20)); var_Items->AddItem(long(30)); var_Items->AddItem(long(40)); var_Items->AddItem(long(50)); long h = var_Items->AddItem("sum(all,dir,dbl(%0))"); var_Items->PutSelectableItem(h,VARIANT_FALSE); var_Items->PutSortableItem(h,VARIANT_FALSE); var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML)); var_Items->PutCellHAlignment(h,long(0),EXGRIDLib::RightAlignment); var_Items->PutFormatCell(h,long(0),L"'<b>HH:NN</b>: '+ (int(value/60) lpad '00') + ':' + ((value mod 60) lpad '00')"); spGrid1->EndUpdate(); |
1185 |
Highlight the match once the filter is applied
// FilterChange event - Occurs when filter was changed. void OnFilterChangeGrid1() { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); _variant_t format = spGrid1->FormatABC(L"`lower(value) replace lower('` + value + `') with '<bgcolor 000000><fgcolor FFFFFF>` + value + `</fgcolor></bgcolor>'`",spGrid1->GetFilterBarPromptPattern(),vtMissing,vtMissing); spGrid1->GetColumns()->GetItem(long(0))->PutFormatColumn(L"format"); spGrid1->GetColumns()->GetItem(long(1))->PutFormatColumn(L"format"); spGrid1->GetColumns()->GetItem(long(2))->PutFormatColumn(L"format"); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutSelBackColor(spGrid1->GetBackColor()); spGrid1->PutSelForeColor(spGrid1->GetForeColor()); spGrid1->PutColumnAutoResize(VARIANT_TRUE); spGrid1->PutContinueColumnScroll(VARIANT_FALSE); spGrid1->PutMarkSearchColumn(VARIANT_FALSE); spGrid1->PutSearchColumnIndex(1); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutHeaderHeight(23); spGrid1->PutBackColorLevelHeader(spGrid1->GetBackColor()); spGrid1->PutFilterBarCaption(L"`<b>` + value + `</b><r><fgcolor=808080>` + ( matchitemcount < 0 ? abs(matchitemcount + 1) + ` result(s)` : ``)"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarCompact | EXGRIDLib::exFilterBarCaptionVisible | EXGRIDLib::exFilterBarVisible | EXGRIDLib::exFilterBarPromptVisible)); spGrid1->PutFilterBarBackColor(spGrid1->GetBackColor()); spGrid1->PutFilterBarPromptPattern(L"and"); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Name"))); var_Column->PutDef(EXGRIDLib::exCellValueFormat,long(1)); var_Column->PutFormatColumn(L"lower(value)"); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Title"))); var_Column1->PutDef(EXGRIDLib::exCellValueFormat,long(1)); var_Column1->PutFormatColumn(L"lower(value)"); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"City"))); var_Column2->PutDef(EXGRIDLib::exCellValueFormat,long(1)); var_Column2->PutFormatColumn(L"lower(value)"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellValue(h0,long(1),"Vice President, Sales"); var_Items->PutCellValue(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellValue(h0,long(1),"Sales Manager"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); spGrid1->EndUpdate(); |
1184 |
The count of filtered items includes the group-parents. How can I exclude them from count
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutDrawGridLines(EXGRIDLib::exVLines); spGrid1->PutHeaderAppearance(EXGRIDLib::Flat); spGrid1->PutHeaderHeight(24); spGrid1->PutSortBarHeight(28); spGrid1->PutSortBarVisible(VARIANT_TRUE); spGrid1->PutAllowGroupBy(VARIANT_TRUE); spGrid1->GetColumns()->Add(L"Col 1"); spGrid1->GetColumns()->Add(L"Col 2"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem("219 Smith"),long(1),"Ignacio 1234"); var_Items->PutCellValue(var_Items->AddItem("1666 County Road 309A"),long(1),"897 Manassa"); var_Items->PutCellValue(var_Items->AddItem("38 Lone Pine"),long(1),"Durango 11"); var_Items->PutCellValue(var_Items->AddItem("612 Jachim Street"),long(1),"Lamar 222"); spGrid1->PutLayout(L"MultipleSort=\"C1:1\""); spGrid1->PutFilterBarCaption(L"`<b>` + value + `</b><r><fgcolor=808080>` + ( matchitemcount < 0 ? leafitemcount + ` result(s)` : ``)"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarCompact | EXGRIDLib::exFilterBarCaptionVisible | EXGRIDLib::exFilterBarVisible | EXGRIDLib::exFilterBarPromptVisible)); spGrid1->PutFilterBarPromptType(EXGRIDLib::FilterPromptEnum(EXGRIDLib::exFilterPromptCaseSensitive | EXGRIDLib::exFilterPromptContainsAll)); spGrid1->PutFilterBarPromptPattern(L"12"); spGrid1->PutFilterBarBackColor(spGrid1->GetBackColor()); spGrid1->EndUpdate(); |
1183 |
Is it possible to display the count of filtered items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutDrawGridLines(EXGRIDLib::exVLines); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutHeaderHeight(24); spGrid1->GetColumns()->Add(L"Col 1"); spGrid1->GetColumns()->Add(L"Col 2"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem("219 Smith"),long(1),"Ignacio 1234"); var_Items->PutCellValue(var_Items->AddItem("1666 County Road 309A"),long(1),"897 Manassa"); var_Items->PutCellValue(var_Items->AddItem("38 Lone Pine"),long(1),"Durango 11"); var_Items->PutCellValue(var_Items->AddItem("612 Jachim Street"),long(1),"Lamar 222"); spGrid1->PutFilterBarCaption(L"`<b>` + value + `</b><r><fgcolor=808080>` + ( matchitemcount < 0 ? abs(matchitemcount + 1) + ` result(s)` : ``)"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarCompact | EXGRIDLib::exFilterBarCaptionVisible | EXGRIDLib::exFilterBarVisible | EXGRIDLib::exFilterBarPromptVisible)); spGrid1->PutFilterBarPromptType(EXGRIDLib::FilterPromptEnum(EXGRIDLib::exFilterPromptCaseSensitive | EXGRIDLib::exFilterPromptContainsAll)); spGrid1->PutFilterBarPromptPattern(L"12"); spGrid1->PutFilterBarBackColor(spGrid1->GetBackColor()); spGrid1->EndUpdate(); |
1182 |
GroupBy code
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutColumnAutoResize(VARIANT_FALSE); spGrid1->PutContinueColumnScroll(VARIANT_FALSE); spGrid1->PutCountLockedColumns(1); spGrid1->PutBackColorLock(RGB(248,248,248)); spGrid1->PutHasLines(EXGRIDLib::exSolidLine); spGrid1->PutLinesAtRoot(EXGRIDLib::exGroupLinesOutside); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library' #import <msado15.dll> rename("EOF","REOF") */ ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset"); rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0); spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs))); spGrid1->PutSortBarVisible(VARIANT_TRUE); spGrid1->PutSingleSort(VARIANT_FALSE); spGrid1->PutAllowGroupBy(VARIANT_TRUE); spGrid1->GetColumns()->GetItem(long(0))->PutWidth(128); spGrid1->PutLayout(L"MultipleSort = \"C12:1 C1:2\""); spGrid1->EndUpdate(); |
1181 |
ADOR, MDB (JET)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutColumnAutoResize(VARIANT_FALSE); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library' #import <msado15.dll> rename("EOF","REOF") */ ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset"); rs->Open("Orders","Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.mdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0); spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs))); spGrid1->EndUpdate(); |
1180 |
Editors (ImageSize = 32)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutImageSize(32); spGrid1->PutDefaultItemHeight(36); spGrid1->PutHeaderHeight(spGrid1->GetDefaultItemHeight()); spGrid1->PutSortBarHeight(spGrid1->GetDefaultItemHeight()); spGrid1->GetFont()->PutSize(_variant_t(long(16))); spGrid1->GetFilterBarFont()->PutSize(_variant_t(spGrid1->GetFont()->GetSize())); spGrid1->GetToolTipFont()->PutSize(_variant_t(spGrid1->GetFont()->GetSize())); spGrid1->PutIndent(26); spGrid1->Images(_bstr_t("gBJJgBAIDAAEg4AEEKAD/hz/EMNh8TIRNGwAjEZAEXjAojKAjMLjABhkaABAk0plUrlktl0vmExmUzmk1m03nE5nU7nk9miAoE+oVDolFo1HpFJpU5h8Sf9OqFNqUOq") + "NUqdPq9VrFWrlbr1QpdhAFAkFis1ntFptVrtkrpszrNvmVxqk3uVtm1kmF3sdBvF/wGBmV+j9BYGHwWJulfxdax2NyFdx2JlV6l9Nw7AAGZymdz2Cy2GxErvWcz9ivlw" + "yV21cuxugwktzGIzmvwtl0+53U5y0a0Wazmmyu/3dCyOMyXHx/J5nIr9q3uyqnBxFN3G46ma4vb7mD2Ng4nZze00fDkHC7t7us2rOX5tguetpHRlmz4HVqnXk1PjHO+C" + "MPo9MBMC+j2vC8j7wS8cFNI4kB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orhsbu18Pph5CiHymI0RpSXGJ/z2oUOxYxG858AyiI+bfJtuTcG5yelBJy" + "T8okhqFd4a5yxL0rvulYtKCsZiWxWkc1s1cRoxxwhA31DLE0mR9l9HqX8fJgTDmFMVH0MIsRzVYnwnMi1dyzmhLt2kS2pxIiU62Wj5ptQGlSYFakLonTUJNLKaM5Wzlf" + "fEkuFkk5wTrhVO2eE7G6lJhxFFYUZ55zmn0WuBCD4pzhirFCKkbomsOoIYmZx5p90LoYWGPdD5g0QmJRKYxbZ6zYoVQ2jVGylSak7KSkFH6RSjpHKFuU+YMyNo5SulkC" + "6I0vonTCitMXPoEpVS2H5FQfEqp2R1opIgAEkJISYARTCukOhmPNI5Ex/wzGHUsicMwA1LHgQ90Y/KpoQHAD+pB/R4NzIaMAB9Xaw1gqaAOsh/A/ptIkWUfhGK1kZH8R" + "gH5GqvgArqRmt4AAPrTroRofBGADkqr6Rmu4D7CEaHARiwpJrEEZsXXwlVjyMWRsaRqwdkLGNBABZmytmyMnaINZqyVpLR2ftKAAAdd6h2osbaskdiq4EZtgSmyNcbVW" + "RJNXe3AA7REar3b0stlAAXBtoRmvJGLjEYAHUWsFcwCD/rnaop9aEICMAPdK5hT6xpeuzdOtAgKuJeGfdq6ggEbkTvAP+p9UCHXrvKkcgIA=="); EXGRIDLib::IAppearancePtr var_Appearance = spGrid1->GetVisualAppearance(); var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABfICg6AADACAxRDgMQBQKAAzQFAYbhkGCGAAGMZxRgmFgAQhFcZQSKUOQTDKMIziaQAGgkNQwCSLIwjNIsBxPFKVQChEYxSjKA40SJNUgyj") + "6CCY+QLIE5PfQgAL9I6eJABCCSQKkYx0HScRiwPBIbAZAYhCZqaKhWgkKI/WBQIABRDVLx5ESiLRtKy7Mq2bpvXBcNxXHalaztO68LxvKyqHb5fJ/PpgL4YHgmC4NQ7E" + "MRwF6rfbyfZ7Xg/ORPTijZ4sdzMHTzJyscx3HqfaBoOaZU5e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TVRBIMxLLSia5oeJqMrnBpNVrIUgXCAGFwHK6BcauXIIDp6XoWWRbAAWDpVVzNNC3YzkCIceADHKiXxmVz4JLdGZ1QTGID2XaYaxWK4oZjsVSc4KDHbETbHFi9Fo" + "3NaaxGisew+GYc4HlCR5NAAAIIEkQJSGMOgdE4RhYDwJJsAaAYQgmPpolCWgSCiBJzjcEIAkQXIBm8d5UhOQgCDUIBDDJDhgggJgKgKYJIDSVoDk8KBFF4OohEMZgWDs" + "YYDj4GoGmGSB2B6B5iAiBgYDsYRjGSbIJo4RgqDuIpIAoLoLmMCJGDKDJjJiLA7xqUAAgGTwYnYPoPmQCQGEKEJkEkFg9gGY44BoRoSmSSQ2EKEggHgRhShSZRJFYVoV" + "mWCRmFKFAgGOTheheZgJgYYoYmYSYWGaF4lkMMJ0hqZpJjYbobmcCZGHKHJmjmJh0h2Z4JmYcIaE8WZ2H6H5oAoBoCiCaBKBYfdjGoJoKiKaJKDaDojmkChGgmIgpCoV" + "oWiWaJZiSd4mmmSh2h6J5qAqBoiiiaY5iSeIpmqComiqKpqkqNouiuah6hqMIsmsSpWiuGhP1kOoumuSp2j6L5sAsBo54gKwWkaMZsgsJpKjKbJLDaRYxYWRpSjSbIZi" + "Se41m2CxmlqNptksdpejebR5iSfI4m4S4W16boLiaao6m5fJ9jubwLkaco8m8S5WnaPZunuOp4j6b5Lnac4SA0PAGlgP4wEwFwGkGcIMCcCpCnCCxiA8NYAAmMJfkSbh" + "FCcFpFnGDBnBqRpUhuEwTDeZ5lHCfw6HIQxLCaAxygyJwqgGcATE4FA6hWY4tjEAAQBAgIA=="); spGrid1->PutBackColorHeader(0x4c6c6c6); spGrid1->PutSelBackColor(0x4000000); spGrid1->PutSelForeColor(RGB(0,0,1)); spGrid1->PutShowFocusRect(VARIANT_FALSE); spGrid1->PutCheckImage(EXGRIDLib::Unchecked,16777216); spGrid1->PutCheckImage(EXGRIDLib::Checked,33554432); spGrid1->PutCheckImage(EXGRIDLib::PartialChecked,50331648); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Editors")))->PutDef(EXGRIDLib::exCellValueFormat,long(1)); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->GetCellEditor(var_Items->AddItem("(ReadOnly)"),long(0))->PutEditType(EXGRIDLib::ReadOnly); var_Items->GetCellEditor(var_Items->AddItem("(EditType)"),long(0))->PutEditType(EXGRIDLib::EditType); long h = var_Items->AddItem("Value 1"); EXGRIDLib::IEditorPtr var_Editor = var_Items->GetCellEditor(h,long(0)); var_Editor->PutEditType(EXGRIDLib::DropDownType); var_Editor->AddItem(1,L"Value 1",long(1)); var_Editor->AddItem(2,L"Value 2",long(2)); var_Editor->AddItem(3,L"Value 3",long(3)); var_Items->PutFormatCell(h,long(0),L"value + ' (DropDownType)'"); h = var_Items->AddItem(long(1)); EXGRIDLib::IEditorPtr var_Editor1 = var_Items->GetCellEditor(h,long(0)); var_Editor1->PutEditType(EXGRIDLib::DropDownListType); var_Editor1->PutDropDownAutoWidth(EXGRIDLib::exDropDownEditorWidth); var_Editor1->AddItem(1,L"Nancy Davolio",long(1)); var_Editor1->AddItem(2,L"Andrew Fuller",long(2)); var_Editor1->AddItem(3,L"Janet Leverling",long(3)); var_Editor1->AddItem(4,L"Peacock Margaret",long(3)); var_Editor1->AddItem(5,L"Steven Buchanan",long(2)); var_Editor1->AddItem(6,L"Michael Suyama",long(1)); var_Editor1->AddItem(7,L"Robert King",long(2)); var_Editor1->AddItem(8,L"Laura Callahan",long(3)); var_Editor1->AddItem(9,L"Anne Dodsworth",long(2)); var_Items->PutFormatCell(h,long(0),L"value + ' (DropDownList - single column list)'"); h = var_Items->AddItem(long(1)); EXGRIDLib::IEditorPtr var_Editor2 = var_Items->GetCellEditor(h,long(0)); var_Editor2->PutEditType(EXGRIDLib::DropDownListType); var_Editor2->PutDropDownAutoWidth(EXGRIDLib::exDropDownEditorWidth); var_Editor2->AddItem(1,L"Nancy Davolio",long(1)); var_Editor2->AddItem(2,L"Andrew Fuller",long(2)); var_Editor2->InsertItem(3,L"Janet Leverling",long(3),long(2)); var_Editor2->InsertItem(4,L"Peacock Margaret",long(3),long(2)); var_Editor2->InsertItem(5,L"Steven Buchanan",long(2),long(2)); var_Editor2->InsertItem(6,L"Michael Suyama",long(1),long(5)); var_Editor2->InsertItem(7,L"Robert King",long(2),long(2)); var_Editor2->InsertItem(8,L"Laura Callahan",long(3),long(2)); var_Editor2->InsertItem(9,L"Anne Dodsworth",long(2),long(5)); var_Editor2->ExpandAll(); var_Items->PutFormatCell(h,long(0),L"value + ' (DropDownList - single column tree)'"); h = var_Items->AddItem(long(1)); EXGRIDLib::IEditorPtr var_Editor3 = var_Items->GetCellEditor(h,long(0)); var_Editor3->PutEditType(EXGRIDLib::DropDownListType); var_Editor3->PutDropDownAutoWidth(EXGRIDLib::exDropDownEditorWidth); var_Editor3->PutOption(EXGRIDLib::exDropDownColumnCaption,"Name¦Title¦City¦Phone"); var_Editor3->PutOption(EXGRIDLib::exDropDownColumnWidth,"312¦¦¦96"); var_Editor3->AddItem(1,L"Nancy Davolio¦Sales Representative¦Seattle¦(206) 555-9857",long(1)); var_Editor3->AddItem(2,L"Andrew Fuller¦<b>Vice President</b>, Sales¦Tacoma¦(206) 555-9482",long(2)); var_Editor3->AddItem(3,L"Janet Leverling¦Sales Representative¦Kirkland¦(206) 555-3412",long(3)); var_Editor3->AddItem(4,L"Peacock Margaret¦Sales Representative¦Redmond¦(206) 555-8122",long(3)); var_Editor3->AddItem(5,L"Steven Buchanan¦Sales Manager¦London¦(71) 555-4848",long(2)); var_Editor3->AddItem(6,L"Michael Suyama¦Sales Representative¦London¦(71) 555-7773",long(1)); var_Editor3->AddItem(7,L"Robert King¦Sales Representative¦Kirkland¦(71) 555-5598",long(2)); var_Editor3->AddItem(8,L"Laura Callahan¦Inside Sales Coordinator¦Seattle¦(206) 555-1189",long(3)); var_Editor3->AddItem(9,L"Anne Dodsworth¦Sales Representative¦London¦(71) 555-4444",long(2)); var_Items->PutFormatCell(h,long(0),L"value + ' (DropDownList - multiple columns list)'"); h = var_Items->AddItem(long(1)); EXGRIDLib::IEditorPtr var_Editor4 = var_Items->GetCellEditor(h,long(0)); var_Editor4->PutEditType(EXGRIDLib::DropDownListType); var_Editor4->PutDropDownAutoWidth(EXGRIDLib::exDropDownEditorWidth); var_Editor4->PutOption(EXGRIDLib::exDropDownColumnCaption,"Name¦Title¦City¦Phone"); var_Editor4->PutOption(EXGRIDLib::exDropDownColumnWidth,"312¦¦¦96"); var_Editor4->AddItem(1,L"Nancy Davolio¦Sales Representative¦Seattle¦(206) 555-9857",long(1)); var_Editor4->AddItem(2,L"Andrew Fuller¦<b>Vice President</b>, Sales¦Tacoma¦(206) 555-9482",long(2)); var_Editor4->InsertItem(3,L"Janet Leverling¦Sales Representative¦Kirkland¦(206) 555-3412",long(3),long(2)); var_Editor4->InsertItem(4,L"Peacock Margaret¦Sales Representative¦Redmond¦(206) 555-8122",long(3),long(2)); var_Editor4->InsertItem(5,L"Steven Buchanan¦Sales Manager¦London¦(71) 555-4848",long(2),long(2)); var_Editor4->InsertItem(6,L"Michael Suyama¦Sales Representative¦London¦(71) 555-7773",long(1),long(5)); var_Editor4->InsertItem(7,L"Robert King¦Sales Representative¦Kirkland¦(71) 555-5598",long(2),long(2)); var_Editor4->InsertItem(8,L"Laura Callahan¦Inside Sales Coordinator¦Seattle¦(206) 555-1189",long(3),long(2)); var_Editor4->InsertItem(9,L"Anne Dodsworth¦Sales Representative¦London¦(71) 555-4444",long(2),long(5)); var_Editor4->ExpandAll(); var_Items->PutFormatCell(h,long(0),L"value + ' (DropDownList - multiple columns tree)'"); h = var_Items->AddItem(long(100)); var_Items->GetCellEditor(h,long(0))->PutEditType(EXGRIDLib::SpinType); var_Items->PutFormatCell(h,long(0),L"value + ' (SpinType)'"); var_Items->GetCellEditor(var_Items->AddItem("(MemoType)"),long(0))->PutEditType(EXGRIDLib::MemoType); h = var_Items->AddItem(long(3)); EXGRIDLib::IEditorPtr var_Editor5 = var_Items->GetCellEditor(h,long(0)); var_Editor5->PutEditType(EXGRIDLib::CheckListType); var_Editor5->AddItem(1,L"Border",long(1)); var_Editor5->AddItem(2,L"Single",long(2)); var_Editor5->AddItem(4,L"Frame",long(3)); var_Items->PutFormatCell(h,long(0),L"value + ' (CheckListType)'"); h = var_Items->AddItem("193.226.40.161"); EXGRIDLib::IEditorPtr var_Editor6 = var_Items->GetCellEditor(h,long(0)); var_Editor6->PutMask(L"{0,255}.{0,255}.{0,255}.{0,255}"); var_Editor6->PutEditType(EXGRIDLib::MaskType); var_Items->PutFormatCell(h,long(0),L"value + ' (MaskType)'"); h = var_Items->AddItem(long(65280)); EXGRIDLib::IEditorPtr var_Editor7 = var_Items->GetCellEditor(h,long(0)); var_Editor7->PutEditType(EXGRIDLib::ColorType); var_Editor7->PutMask(L"`RGB(`{0,255}\\,{0,255}\\,{0,255}`)`;;0"); var_Items->PutFormatCell(h,long(0),L"value + ' (ColorType)'"); h = var_Items->AddItem("Tahoma"); var_Items->GetCellEditor(h,long(0))->PutEditType(EXGRIDLib::FontType); var_Items->PutFormatCell(h,long(0),L"value + ' (FontType)'"); h = var_Items->AddItem(_bstr_t("gBHJJGHA5MIwAEIe4AAAFhwbiAliQwig7ixFjBQjRbjhljxwkB7kSFkiQkyblCllSwli7lzFmDQmTbmjlmzwnD7nQBnk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") + "lVq1XrFZrVbrldr1YhgAEL5AgBhj/AAssMJthABFof4JDhIWCgYKDBATFT8M6hUIFAQAEQCCDwYF/QoWDZCRBgOKgIYHCQXMisKBAEQAAgOBZaSgQhjERANKQiZhIWam" + "YyIBQ6FzcNKxQLJT4ADA4RjwObAAidBYdHwABQgUxMQYZEI0cD4OgnYKaKyzIRFNQx2YCKoFHScYD0ADXQwUAgwLoLQDqaCWBJoNQ9NBxFJTVQORgiarqSABbamGwtDA" + "wBUWhQmqYALnOFQvGYPA4m6AwKhkZxKj2PBWC0SZCgmVY6CwIJgieBAniubRKHgaYgiwQwGiCfxGDWbBRmGZYIi2VwGnAexxGUSwUFiaR+hQPbBgOCoLCIHh4DAARCmQ" + "G4AlgNxuhwWgpFAEQUhuOxOk0NrhAaQoBmgPYdFSIZPjYGYbn+HhgEoAA7HMBIOjUM51AoPojHkEwVlET5slgWZtAEUBdjeSoeF6X5/rQRRSi+QB6GychsEAfZshKYAB" + "GQZorlAOgMBqEgAjYHB2jqSoigmYBLk+QZnBqGhggAEwImgbojgoIwSE+MxUHiS4REQCQWluD48B+JJoL+YQikuaI9AALgLmsJQfnSdAvDkCJEhIIIBgOegLEiPBqCyC" + "AAjcCwgAAIJBhQBQkHGL4gDaNBokkZQMiwUAuioJQiCAQYsHMcwwEIeoigAYIogsGIwFKIYICIWguEoPgQhsawBASGgwCuJwLH8K4LigAIaDwbxMAOKxbisPwfASQATF" + "ASoagIEYwgcSoKGiAA/mEdIuiGPxCmObIlhMIJNHONxFH8EpPCGeB+noEpBBSSRjCsPZEiyKhgjAH5whSdLEjwDxjC8TxVEMFRzFWJJZBUSI0gQEQLBOM4VHkIg1D0CA" + "JDQNg/p4AAdoC"); var_Items->GetCellEditor(h,long(0))->PutEditType(EXGRIDLib::PictureType); var_Items->PutFormatCell(h,long(0),L"value + ' (PictureType)'"); var_Items->GetCellEditor(var_Items->AddItem("(ButtonType)"),long(0))->PutEditType(EXGRIDLib::ButtonType); h = var_Items->AddItem(long(25)); var_Items->GetCellEditor(h,long(0))->PutEditType(EXGRIDLib::ProgressBarType); var_Items->PutFormatCell(h,long(0),L"value + ' (ProgressBarType)'"); h = var_Items->AddItem("Value 1"); EXGRIDLib::IEditorPtr var_Editor8 = var_Items->GetCellEditor(h,long(0)); var_Editor8->PutEditType(EXGRIDLib::PickEditType); var_Editor8->AddItem(1,L"Value 1",long(1)); var_Editor8->AddItem(2,L"Value 2",long(2)); var_Editor8->AddItem(3,L"Value 3",long(3)); var_Items->PutFormatCell(h,long(0),L"value + ' (PickEditType)'"); var_Items->GetCellEditor(var_Items->AddItem("(LinkEditType)"),long(0))->PutEditType(EXGRIDLib::LinkEditType); EXGRIDLib::IEditorPtr var_Editor9 = var_Items->GetCellEditor(var_Items->AddItem("(UserEditorType)"),long(0)); var_Editor9->PutEditType(EXGRIDLib::UserEditorType); var_Editor9->UserEditor(L"Exontrol.ComboBox",L""); ObjectPtr var_Object = var_Editor9->GetUserEditorObject(); h = var_Items->AddItem(long(255)); EXGRIDLib::IEditorPtr var_Editor10 = var_Items->GetCellEditor(h,long(0)); var_Editor10->PutEditType(EXGRIDLib::ColorListType); var_Editor10->PutOption(EXGRIDLib::exColorListShowName,VARIANT_TRUE); var_Items->PutFormatCell(h,long(0),L"value + ' (ColorListType)'"); var_Items->GetCellEditor(var_Items->AddItem(long(65280)),long(0))->PutEditType(EXGRIDLib::ColorListType); var_Items->GetCellEditor(var_Items->AddItem("(MemoDropDownType)"),long(0))->PutEditType(EXGRIDLib::MemoDropDownType); EXGRIDLib::IEditorPtr var_Editor11 = var_Items->GetCellEditor(var_Items->AddItem(long(-1)),long(0)); var_Editor11->PutEditType(EXGRIDLib::CheckValueType); var_Editor11->PutOption(EXGRIDLib::exCheckValue2,long(1)); h = var_Items->AddItem(long(50)); EXGRIDLib::IEditorPtr var_Editor12 = var_Items->GetCellEditor(h,long(0)); var_Editor12->PutEditType(EXGRIDLib::SliderType); var_Editor12->PutOption(EXGRIDLib::exSliderWidth,long(-60)); var_Editor12->PutOption(EXGRIDLib::exSliderTickFrequency,long(10)); var_Editor12->PutOption(EXGRIDLib::exSliderTickStyle,long(2)); var_Items->PutFormatCell(h,long(0),L"value + ' (SliderType)'"); h = var_Items->AddItem(long(100)); var_Items->GetCellEditor(h,long(0))->PutEditType(EXGRIDLib::CalculatorType); var_Items->PutFormatCell(h,long(0),L"value + ' (CalculatorType)'"); var_Items->EnsureVisibleItem(h); spGrid1->EndUpdate(); |
1179 |
Editors (ImageSize = 16, default)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutImageSize(16); spGrid1->Images(_bstr_t("gBJJgBAIDAAEg4ACEKAD/hz/EMNh8TIRNGwAjEZAEXjAojJAjMLjABAAgjUYkUnlUrlktl0vmExmUzmk1m03nE5nU7nkrQCAntBoVDolFo1HoM/ADAplLptImdMYFOq") + "dSqlXq1QrVbrlGpVWsFNrNdnNjsk7pQAtNroFnt0sh8Yr9iulTuNxs1Eu8OiT/vsnsNVutXlk/oGGtVKxGLxWNtsZtN8iUYuNvy0Zvd+xNYwdwvl4p870GCqc8vOeuVt" + "tmp1knyOayWVy+WzN/ze1wOElenm+12WUz/Bv2/3UyyWrzeutux2GSyGP2dQ33C1ur3GD3M4zUNzHdlWjq/E3nGzVpjWv4HA7fRy/Tv2IrN8rPW6nZ3ve7mUlfu20Z8a" + "cvQyb+vY9jasYoDwMm+LytVBDqKG3z8O3Cb8P+mkAuY9cCQ2uL4KaxDKvkp8RNLEjqugnrwQo/UWPzFyeQw5sNLZFENrI4kOqU66pw8uzmOKvTqNqjULJvGL1JO48GtT" + "GsbLdEL3scxLlyiw8dQeoUVxdLTtyKmUjwGlslRPJsnK1HbAKbKCrsQo8uQk/CeP44iaR/ATnTNPLvyxPU+z9P9AUDQVBowiofJXQ6Oo+kKMpIkjztE4TKn4P6JowfgP" + "nwD5/nAjB8AOeAPo0eAA1IAFH07UhAIMpYAVIYFHqBUhwVjV1S1EtQAHxW65V0AZwAeuQAnwB5gAPYViEDVhwAHTQBkCjB4gOhwDmCyhH0sACAg=="); EXGRIDLib::IAppearancePtr var_Appearance = spGrid1->GetVisualAppearance(); var_Appearance->Add(4,_bstr_t("gBFLBCJwBAEHhEJAAEhABUYCg6AADACAxRDgMQBQKAAzQFAYbhkGCGAAGMZxRgmFgAQhFcZQSKUOQTDKMIzi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->GetColumns()->Add(L"Editors")))->PutDef(EXGRIDLib::exCellValueFormat,long(1)); spGrid1->PutBackColorHeader(0x4c6c6c6); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->GetCellEditor(var_Items->AddItem("(ReadOnly)"),long(0))->PutEditType(EXGRIDLib::ReadOnly); var_Items->GetCellEditor(var_Items->AddItem("(EditType)"),long(0))->PutEditType(EXGRIDLib::EditType); long h = var_Items->AddItem("Value 1"); EXGRIDLib::IEditorPtr var_Editor = var_Items->GetCellEditor(h,long(0)); var_Editor->PutEditType(EXGRIDLib::DropDownType); var_Editor->AddItem(1,L"Value 1",long(1)); var_Editor->AddItem(2,L"Value 2",long(2)); var_Editor->AddItem(3,L"Value 3",long(3)); var_Items->PutFormatCell(h,long(0),L"value + ' (DropDownType)'"); h = var_Items->AddItem(long(1)); EXGRIDLib::IEditorPtr var_Editor1 = var_Items->GetCellEditor(h,long(0)); var_Editor1->PutEditType(EXGRIDLib::DropDownListType); var_Editor1->PutDropDownAutoWidth(EXGRIDLib::exDropDownEditorWidth); var_Editor1->AddItem(1,L"Nancy Davolio",long(1)); var_Editor1->AddItem(2,L"Andrew Fuller",long(2)); var_Editor1->AddItem(3,L"Janet Leverling",long(3)); var_Editor1->AddItem(4,L"Peacock Margaret",long(3)); var_Editor1->AddItem(5,L"Steven Buchanan",long(2)); var_Editor1->AddItem(6,L"Michael Suyama",long(1)); var_Editor1->AddItem(7,L"Robert King",long(2)); var_Editor1->AddItem(8,L"Laura Callahan",long(3)); var_Editor1->AddItem(9,L"Anne Dodsworth",long(2)); var_Items->PutFormatCell(h,long(0),L"value + ' (DropDownList - single column list)'"); h = var_Items->AddItem(long(1)); EXGRIDLib::IEditorPtr var_Editor2 = var_Items->GetCellEditor(h,long(0)); var_Editor2->PutEditType(EXGRIDLib::DropDownListType); var_Editor2->PutDropDownAutoWidth(EXGRIDLib::exDropDownEditorWidth); var_Editor2->AddItem(1,L"Nancy Davolio",long(1)); var_Editor2->AddItem(2,L"Andrew Fuller",long(2)); var_Editor2->InsertItem(3,L"Janet Leverling",long(3),long(2)); var_Editor2->InsertItem(4,L"Peacock Margaret",long(3),long(2)); var_Editor2->InsertItem(5,L"Steven Buchanan",long(2),long(2)); var_Editor2->InsertItem(6,L"Michael Suyama",long(1),long(5)); var_Editor2->InsertItem(7,L"Robert King",long(2),long(2)); var_Editor2->InsertItem(8,L"Laura Callahan",long(3),long(2)); var_Editor2->InsertItem(9,L"Anne Dodsworth",long(2),long(5)); var_Editor2->ExpandAll(); var_Items->PutFormatCell(h,long(0),L"value + ' (DropDownList - single column tree)'"); h = var_Items->AddItem(long(1)); EXGRIDLib::IEditorPtr var_Editor3 = var_Items->GetCellEditor(h,long(0)); var_Editor3->PutEditType(EXGRIDLib::DropDownListType); var_Editor3->PutDropDownAutoWidth(EXGRIDLib::exDropDownEditorWidth); var_Editor3->PutOption(EXGRIDLib::exDropDownColumnCaption,"Name¦Title¦City¦Phone"); var_Editor3->PutOption(EXGRIDLib::exDropDownColumnWidth,"312¦¦¦96"); var_Editor3->AddItem(1,L"Nancy Davolio¦Sales Representative¦Seattle¦(206) 555-9857",long(1)); var_Editor3->AddItem(2,L"Andrew Fuller¦<b>Vice President</b>, Sales¦Tacoma¦(206) 555-9482",long(2)); var_Editor3->AddItem(3,L"Janet Leverling¦Sales Representative¦Kirkland¦(206) 555-3412",long(3)); var_Editor3->AddItem(4,L"Peacock Margaret¦Sales Representative¦Redmond¦(206) 555-8122",long(3)); var_Editor3->AddItem(5,L"Steven Buchanan¦Sales Manager¦London¦(71) 555-4848",long(2)); var_Editor3->AddItem(6,L"Michael Suyama¦Sales Representative¦London¦(71) 555-7773",long(1)); var_Editor3->AddItem(7,L"Robert King¦Sales Representative¦Kirkland¦(71) 555-5598",long(2)); var_Editor3->AddItem(8,L"Laura Callahan¦Inside Sales Coordinator¦Seattle¦(206) 555-1189",long(3)); var_Editor3->AddItem(9,L"Anne Dodsworth¦Sales Representative¦London¦(71) 555-4444",long(2)); var_Items->PutFormatCell(h,long(0),L"value + ' (DropDownList - multiple columns list)'"); h = var_Items->AddItem(long(1)); EXGRIDLib::IEditorPtr var_Editor4 = var_Items->GetCellEditor(h,long(0)); var_Editor4->PutEditType(EXGRIDLib::DropDownListType); var_Editor4->PutDropDownAutoWidth(EXGRIDLib::exDropDownEditorWidth); var_Editor4->PutOption(EXGRIDLib::exDropDownColumnCaption,"Name¦Title¦City¦Phone"); var_Editor4->PutOption(EXGRIDLib::exDropDownColumnWidth,"312¦¦¦96"); var_Editor4->AddItem(1,L"Nancy Davolio¦Sales Representative¦Seattle¦(206) 555-9857",long(1)); var_Editor4->AddItem(2,L"Andrew Fuller¦<b>Vice President</b>, Sales¦Tacoma¦(206) 555-9482",long(2)); var_Editor4->InsertItem(3,L"Janet Leverling¦Sales Representative¦Kirkland¦(206) 555-3412",long(3),long(2)); var_Editor4->InsertItem(4,L"Peacock Margaret¦Sales Representative¦Redmond¦(206) 555-8122",long(3),long(2)); var_Editor4->InsertItem(5,L"Steven Buchanan¦Sales Manager¦London¦(71) 555-4848",long(2),long(2)); var_Editor4->InsertItem(6,L"Michael Suyama¦Sales Representative¦London¦(71) 555-7773",long(1),long(5)); var_Editor4->InsertItem(7,L"Robert King¦Sales Representative¦Kirkland¦(71) 555-5598",long(2),long(2)); var_Editor4->InsertItem(8,L"Laura Callahan¦Inside Sales Coordinator¦Seattle¦(206) 555-1189",long(3),long(2)); var_Editor4->InsertItem(9,L"Anne Dodsworth¦Sales Representative¦London¦(71) 555-4444",long(2),long(5)); var_Editor4->ExpandAll(); var_Items->PutFormatCell(h,long(0),L"value + ' (DropDownList - multiple columns tree)'"); h = var_Items->AddItem(long(100)); var_Items->GetCellEditor(h,long(0))->PutEditType(EXGRIDLib::SpinType); var_Items->PutFormatCell(h,long(0),L"value + ' (SpinType)'"); var_Items->GetCellEditor(var_Items->AddItem("(MemoType)"),long(0))->PutEditType(EXGRIDLib::MemoType); h = var_Items->AddItem(long(3)); EXGRIDLib::IEditorPtr var_Editor5 = var_Items->GetCellEditor(h,long(0)); var_Editor5->PutEditType(EXGRIDLib::CheckListType); var_Editor5->AddItem(1,L"Border",long(1)); var_Editor5->AddItem(2,L"Single",long(2)); var_Editor5->AddItem(4,L"Frame",long(3)); var_Items->PutFormatCell(h,long(0),L"value + ' (CheckListType)'"); h = var_Items->AddItem("193.226.40.161"); EXGRIDLib::IEditorPtr var_Editor6 = var_Items->GetCellEditor(h,long(0)); var_Editor6->PutMask(L"{0,255}.{0,255}.{0,255}.{0,255}"); var_Editor6->PutEditType(EXGRIDLib::MaskType); var_Items->PutFormatCell(h,long(0),L"value + ' (MaskType)'"); h = var_Items->AddItem(long(65280)); EXGRIDLib::IEditorPtr var_Editor7 = var_Items->GetCellEditor(h,long(0)); var_Editor7->PutEditType(EXGRIDLib::ColorType); var_Editor7->PutMask(L"`RGB(`{0,255}\\,{0,255}\\,{0,255}`)`;;0"); var_Items->PutFormatCell(h,long(0),L"value + ' (ColorType)'"); h = var_Items->AddItem("Tahoma"); var_Items->GetCellEditor(h,long(0))->PutEditType(EXGRIDLib::FontType); var_Items->PutFormatCell(h,long(0),L"value + ' (FontType)'"); h = var_Items->AddItem(_bstr_t("gBHJJGHA5MIwAEIe4AAAFhwbiAliQwig7ixFjBQjRbjhljxwkB7kSFkiQkyblCllSwli7lzFmDQmTbmjlmzwnD7nQBnk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") + "lVq1XrFZrVbrldr1YhgAEL5AgBhj/AAssMJthABFof4JDhIWCgYKDBATFT8M6hUIFAQAEQCCDwYF/QoWDZCRBgOKgIYHCQXMisKBAEQAAgOBZaSgQhjERANKQiZhIWam" + "YyIBQ6FzcNKxQLJT4ADA4RjwObAAidBYdHwABQgUxMQYZEI0cD4OgnYKaKyzIRFNQx2YCKoFHScYD0ADXQwUAgwLoLQDqaCWBJoNQ9NBxFJTVQORgiarqSABbamGwtDA" + "wBUWhQmqYALnOFQvGYPA4m6AwKhkZxKj2PBWC0SZCgmVY6CwIJgieBAniubRKHgaYgiwQwGiCfxGDWbBRmGZYIi2VwGnAexxGUSwUFiaR+hQPbBgOCoLCIHh4DAARCmQ" + "G4AlgNxuhwWgpFAEQUhuOxOk0NrhAaQoBmgPYdFSIZPjYGYbn+HhgEoAA7HMBIOjUM51AoPojHkEwVlET5slgWZtAEUBdjeSoeF6X5/rQRRSi+QB6GychsEAfZshKYAB" + "GQZorlAOgMBqEgAjYHB2jqSoigmYBLk+QZnBqGhggAEwImgbojgoIwSE+MxUHiS4REQCQWluD48B+JJoL+YQikuaI9AALgLmsJQfnSdAvDkCJEhIIIBgOegLEiPBqCyC" + "AAjcCwgAAIJBhQBQkHGL4gDaNBokkZQMiwUAuioJQiCAQYsHMcwwEIeoigAYIogsGIwFKIYICIWguEoPgQhsawBASGgwCuJwLH8K4LigAIaDwbxMAOKxbisPwfASQATF" + "ASoagIEYwgcSoKGiAA/mEdIuiGPxCmObIlhMIJNHONxFH8EpPCGeB+noEpBBSSRjCsPZEiyKhgjAH5whSdLEjwDxjC8TxVEMFRzFWJJZBUSI0gQEQLBOM4VHkIg1D0CA" + "JDQNg/p4AAdoC"); var_Items->GetCellEditor(h,long(0))->PutEditType(EXGRIDLib::PictureType); var_Items->PutFormatCell(h,long(0),L"value + ' (PictureType)'"); var_Items->GetCellEditor(var_Items->AddItem("(ButtonType)"),long(0))->PutEditType(EXGRIDLib::ButtonType); h = var_Items->AddItem(long(25)); var_Items->GetCellEditor(h,long(0))->PutEditType(EXGRIDLib::ProgressBarType); var_Items->PutFormatCell(h,long(0),L"value + ' (ProgressBarType)'"); h = var_Items->AddItem("Value 1"); EXGRIDLib::IEditorPtr var_Editor8 = var_Items->GetCellEditor(h,long(0)); var_Editor8->PutEditType(EXGRIDLib::PickEditType); var_Editor8->AddItem(1,L"Value 1",long(1)); var_Editor8->AddItem(2,L"Value 2",long(2)); var_Editor8->AddItem(3,L"Value 3",long(3)); var_Items->PutFormatCell(h,long(0),L"value + ' (PickEditType)'"); var_Items->GetCellEditor(var_Items->AddItem("(LinkEditType)"),long(0))->PutEditType(EXGRIDLib::LinkEditType); EXGRIDLib::IEditorPtr var_Editor9 = var_Items->GetCellEditor(var_Items->AddItem("(UserEditorType)"),long(0)); var_Editor9->PutEditType(EXGRIDLib::UserEditorType); var_Editor9->UserEditor(L"Exontrol.ComboBox",L""); ObjectPtr var_Object = var_Editor9->GetUserEditorObject(); h = var_Items->AddItem(long(255)); EXGRIDLib::IEditorPtr var_Editor10 = var_Items->GetCellEditor(h,long(0)); var_Editor10->PutEditType(EXGRIDLib::ColorListType); var_Editor10->PutOption(EXGRIDLib::exColorListShowName,VARIANT_TRUE); var_Items->PutFormatCell(h,long(0),L"value + ' (ColorListType)'"); var_Items->GetCellEditor(var_Items->AddItem(long(65280)),long(0))->PutEditType(EXGRIDLib::ColorListType); var_Items->GetCellEditor(var_Items->AddItem("(MemoDropDownType)"),long(0))->PutEditType(EXGRIDLib::MemoDropDownType); EXGRIDLib::IEditorPtr var_Editor11 = var_Items->GetCellEditor(var_Items->AddItem(long(-1)),long(0)); var_Editor11->PutEditType(EXGRIDLib::CheckValueType); var_Editor11->PutOption(EXGRIDLib::exCheckValue2,long(1)); h = var_Items->AddItem(long(50)); EXGRIDLib::IEditorPtr var_Editor12 = var_Items->GetCellEditor(h,long(0)); var_Editor12->PutEditType(EXGRIDLib::SliderType); var_Editor12->PutOption(EXGRIDLib::exSliderWidth,long(-60)); var_Editor12->PutOption(EXGRIDLib::exSliderTickFrequency,long(10)); var_Editor12->PutOption(EXGRIDLib::exSliderTickStyle,long(2)); var_Items->PutFormatCell(h,long(0),L"value + ' (SliderType)'"); h = var_Items->AddItem(long(100)); var_Items->GetCellEditor(h,long(0))->PutEditType(EXGRIDLib::CalculatorType); var_Items->PutFormatCell(h,long(0),L"value + ' (CalculatorType)'"); var_Items->EnsureVisibleItem(h); spGrid1->EndUpdate(); |
1178 |
Re-order the cell's caption, icons and images/pictures
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->Images(_bstr_t("gBJJgBAICAADAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEahkZAIAEEbjMjlErlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") + "lVq1XrFZrVbrlTiFdib/sNjr9gs1nldlrlqtFtt0stlguNvulyh91ud1vVVvNuvt7wFHr9/vl3luEwOJouIq+Dw2KyGRyWTymVy2XzGZzUuiw+lmej0gkUaksljaAnmD" + "cD/cEbf7w1+ufD/fEbeB028bYAO3enB6AB++4EoA4A4sb4vHjXJ4nG5vKAHA4ca6XBjTAD/Y2x/eB/jcB"); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"ToLeft"))); var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"ToRight"))); var_Column1->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column1->PutDef(EXGRIDLib::exCellDrawPartsOrder,"caption,picture,icons,icon,check"); spGrid1->PutDefaultItemHeight(32); spGrid1->PutDrawGridLines(EXGRIDLib::exVLines); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Caption"); var_Items->PutCellImage(h,long(0),2); var_Items->PutCellImages(h,long(0),"1,2"); var_Items->PutCellPicture(h,long(0),((ObjectPtr)(spGrid1->ExecuteTemplate(_bstr_t("loadpicture(`gCJKBOI4NBQaBQAhQNJJIIhShQAEEREAIA0ROZ6PT0hQKYZpIZDKBJkIgKByN5mNJsM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WP1WJ1CN1MTR6gH4cmysjKr2mlCqn3GuR+jDoJHGWlKkU+ajXpgg1yq2FQDFigSEBROwkCKnQwGwjliIU45x2HGyIB4dnM0UmUC+PhaLxefwOdia5zMT3+8wwYCQmEwd" + "i4vQKqHKvigKHoKnc9Rs7GMDUOhhGOnAYjWkzKKRGyxsDUA01QCw0QCOF0uh0OkfRUMMbyRNwTBiCYZwKMIYyZAUkSlBYkxsCYAAHG4qwCBwMQfBYlxsNgsDhLEgwHA8" + "PiPNg1ygP4uywIgMSwK4zSQG46BnFAATDJcL3IHM6DQBsPR3O83j/AsJyGH8w4ZJY5TsN8EAdFojTwJ0AAoA4MgATIMDqAcrQPMEwTDBgVy0LYtiuK8qyrFs6QtCocnL" + "Cs8wAGAChOGM+CZJ0HAaoQHQYocBiaHtJT3LEfgCLYIgQNYgw4IQiSaBcAABBEAB/DAXS4HgPAgLUSCzGkPjkIATyXPQoCeNYfR6Do7QGI8Zj+CAHiyCY2SkIQTSSCIy" + "DQCkpDBJQJinMMuAUPgOxGOcpA/AkoTzJwyiYFMiDwJEsShFAURFCwJRVFceQXKQIS8P8STlBgLggAcrAQCQATjIgZA0JgVSxL0OAmKI6CpEc4SuOkeBeOwMRnLQuQhO" + "ApDJAImYmD44BPIgAzFMYiR3LcQw4JwqhQAknAMFAxwEEwJwUO4ljCHgmxzNwNQ3EU3ScLYEAACocDePwZgCLI+yFN8jg7FEQTtKMcwrAAOhgHw6SQI4OCmJgjDmNAjj" + "5Gw+wbHkkTpEw7gpFgIAA2sABJEUThEK4QhgIJAQ==`)")))); var_Items->PutCellValue(h,long(1),var_Items->GetCellValue(h,long(0))); var_Items->PutCellHAlignment(h,long(1),EXGRIDLib::RightAlignment); var_Items->PutCellImage(h,long(1),var_Items->GetCellImage(h,long(0))); var_Items->PutCellImages(h,long(1),"2,1"); var_Items->PutCellPicture(h,long(1),((ObjectPtr)(var_Items->GetCellPicture(h,long(0))))); h = var_Items->AddItem("<b>HTML</b> <off 4>Caption"); var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::exHTML); var_Items->PutCellImage(h,long(0),2); var_Items->PutCellImages(h,long(0),"1,2"); var_Items->PutCellPicture(h,long(0),((ObjectPtr)(spGrid1->ExecuteTemplate(_bstr_t("loadpicture(`gCJKBOI4NBQaBQAhQNJJIIhShQAEEREAIA0ROZ6PT0hQKYZpIZDKBJkIgKByN5mNJsMsKPABVqXBI4KjrD7HL6GWKPJKiCIhMiySidKxbOzZZJWMLs") + "GL2FqyLjZMonNa2CyiZDOUqsQqUEq0ZCNISFXDIFxzZ4hUrbdrefZ/fz3ZgzZ75Tz3XjvHZnZznPieb55AKgAqmRyOOzEhR7XirWaWQQMTa+QIhDbZOZAAoYUCPDAQG7" + "FXI4JRrNCoIRdPyyFr0AYifDUKZ+PCufK4RReALLUbtdBHSrGTCCNKqT4MbRqUxxQx+CAAEQ2VCBbxqGaLYDZNgzFbCbLDarRCrqMYMM6cWqpHKUDqhZjnVijEoLcp0F" + "CjVg2OYhTjN/QWk4bo4iseBsAcABIDoPA5g2HgADIkQfDCNxwkEQYnFmAIAB4OJHGcKAPioGRKFKdh2g6UB8iiZ5QkYQp3gKWhDlsWYmAARBcgCIAUniVpmiSA5AF3A4" + "wG8P41nGWwDDAW4MAAIpSG+bRzBoGx3AeCJhh6C4ljCUJGnSRBUFKAIQA6EgIHMWBoHqYgAngHJDCALBmhCCAfHOARAScUBvAmc5zHYXxoguXQ8DEMIAH8dI8HmP4/Ay" + "QJAEAYAoHqRByEQGJiECBAzAkKIpBYNIcikAp8kcZhDn4EBChmUoMgqHIqhiWoIgaDImgyVQImaRw/F0EZGCcSw3DaM4Kn6GBBhwYYZDGZo3C+RgOAmNQnhYeYqgsTZe" + "nEVgSFYLo2CydhGg4OROF2HJjlydR7i+cJjDGFo8BgHgVl4Po+DufJRgcbQOlkCxyKuCJNAsdwIhSC4mgieYKkeHJWD0Ih8BQaYYkkMYppwTg0EsFhJC0SxEkgeodDSF" + "pTheV5SDgLBIieRIig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(1),var_Items->GetCellValue(h,long(0))); var_Items->PutCellValueFormat(h,long(1),EXGRIDLib::exHTML); var_Items->PutCellHAlignment(h,long(1),EXGRIDLib::RightAlignment); var_Items->PutCellImage(h,long(1),var_Items->GetCellImage(h,long(0))); var_Items->PutCellImages(h,long(1),"2,1"); var_Items->PutCellPicture(h,long(1),((ObjectPtr)(var_Items->GetCellPicture(h,long(0))))); spGrid1->EndUpdate(); |
1177 |
ImageSize property on 32 (specifies the size of control' icons/images/check-boxes/radio-buttons)
// AddColumn event - Fired after a new column has been added. void OnAddColumnGrid1(LPDISPATCH Column) { // Column.Def(48) = 2 // Column.Def(49) = 2 } /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutImageSize(32); spGrid1->PutDefaultItemHeight(36); spGrid1->PutHeaderHeight(spGrid1->GetDefaultItemHeight()); spGrid1->PutSortBarHeight(spGrid1->GetDefaultItemHeight()); spGrid1->GetFont()->PutSize(_variant_t(long(16))); spGrid1->GetFilterBarFont()->PutSize(_variant_t(spGrid1->GetFont()->GetSize())); spGrid1->GetToolTipFont()->PutSize(_variant_t(spGrid1->GetFont()->GetSize())); spGrid1->PutIndent(26); spGrid1->Images(_bstr_t("gBJJgBAIDAAEg4AEEKAD/hz/EMNh8TIRNGwAjEZAEXjAojKAjMLjABhkaABAk0plUrlktl0vmExmUzmk1m03nE5nU7nk9miAoE+oVDolFo1HpFJpU5h8Sf9OqFNqUOq") + "NUqdPq9VrFWrlbr1QpdhAFAkFis1ntFptVrtkrpszrNvmVxqk3uVtm1kmF3sdBvF/wGBmV+j9BYGHwWJulfxdax2NyFdx2JlV6l9Nw7AAGZymdz2Cy2GxErvWcz9ivlw" + "yV21cuxugwktzGIzmvwtl0+53U5y0a0Wazmmyu/3dCy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cHEWET4XJwkTszlVqm2GokewxtBT1DpQjRxDN0rUV" + "DNKdC3lb6tzNOwh6upMSSYfv4YBCl/bsn9PxiFCEo7SI6Obc9HeOrnY8x4jtHtdpN4GRbaorhsbu18Pph5CiHymI0RpSXGJ/z2oUOxYxG858AyiI+bfJtuTcG5yelBJy" + "T8okhqFd4a5yxL0rvulYtKCsZiWxWkc1s1cRoxxwhA31DLE0mR9l9HqX8fJgTDmFMVH0MIsRzVYnwnMi1dyzmhLt2kS2pxIiU62Wj5ptQGlSYFakLonTUJNLKaM5Wzlf" + "fEkuFkk5wTrhVO2eE7G6lJhxFFYUZ55zmn0WuBCD4pzhirFCKkbomsOoIYmZx5p90LoYWGPdD5g0QmJRKYxbZ6zYoVQ2jVGylSak7KSkFH6RSjpHKFuU+YMyNo5SulkC" + "6I0vonTCitMXPoEpVS2H5FQfEqp2R1opIgAEkJISYARTCukOhmPNI5Ex/wzGHUsicMwA1LHgQ90Y/KpoQHAD+pB/R4NzIaMAB9Xaw1gqaAOsh/A/ptIkWUfhGK1kZH8R" + "gH5GqvgArqRmt4AAPrTroRofBGADkqr6Rmu4D7CEaHARiwpJrEEZsXXwlVjyMWRsaRqwdkLGNBABZmytmyMnaINZqyVpLR2ftKAAAdd6h2osbaskdiq4EZtgSmyNcbVW" + "RJNXe3AA7REar3b0stlAAXBtoRmvJGLjEYAHUWsFcwCD/rnaop9aEICMAPdK5hT6xpeuzdOtAgKuJeGfdq6ggEbkTvAP+p9UCHXrvKkcgIA=="); EXGRIDLib::IAppearancePtr var_Appearance = spGrid1->GetVisualAppearance(); var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABfICg6AADACAxRDgMQBQKAAzQFAYbhkGCGAAGMZxRgmFgAQhFcZQSKUOQTDKMIziaQAGgkNQwCSLIwjNIsBxPFKVQChEYxSjKA40SJNUgyj") + "6CCY+QLIE5PfQgAL9I6eJABCCSQKkYx0HScRiwPBIbAZAYhCZqaKhWgkKI/WBQIABRDVLx5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AUY/cTzaAEUwHHiTKInaCQShsFYJUJAdRURQ9EwvCIZBpEWwLChENQwWLCNj2TScBwjCyqbale45ViqdoDU5EUiXJJ8ZxnECfYyrGjaMpCeKB" + "UrGYTVRBIMxLLSia5oeJqMrnBpNVrIUgXCAGFwHK6BcauXIIDp6XoWWRbAAWDpVVzNNC3YzkCIceADHKiXxmVz4JLdGZ1QTGID2XaYaxWK4oZjsVSc4KDHbETbHFi9Fo" + "3NaaxGisew+GYc4HlCR5NAAAIIEkQJSGMOgdE4RhYDwJJsAaAYQgmPpolCWgSCiBJzjcEIAkQXIBm8d5UhOQgCDUIBDDJDhgggJgKgKYJIDSVoDk8KBFF4OohEMZgWDs" + "YYDj4GoGmGSB2B6B5iAiBgYDsYRjGSbIJo4RgqDuIpIAoLoLmMCJGDKDJjJiLA7xqUAAgGTwYnYPoPmQCQGEKEJkEkFg9gGY44BoRoSmSSQ2EKEggHgRhShSZRJFYVoV" + "mWCRmFKFAgGOTheheZgJgYYoYmYSYWGaF4lkMMJ0hqZpJjYbobmcCZGHKHJmjmJh0h2Z4JmYcIaE8WZ2H6H5oAoBoCiCaBKBYfdjGoJoKiKaJKDaDojmkChGgmIgpCoV" + "oWiWaJZiSd4mmmSh2h6J5qAqBoiiiaY5iSeIpmqComiqKpqkqNouiuah6hqMIsmsSpWiuGhP1kOoumuSp2j6L5sAsBo54gKwWkaMZsgsJpKjKbJLDaRYxYWRpSjSbIZi" + "Se41m2CxmlqNptksdpejebR5iSfI4m4S4W16boLiaao6m5fJ9jubwLkaco8m8S5WnaPZunuOp4j6b5Lnac4SA0PAGlgP4wEwFwGkGcIMCcCpCnCCxiA8NYAAmMJfkSbh" + "FCcFpFnGDBnBqRpUhuEwTDeZ5lHCfw6HIQxLCaAxygyJwqgGcATE4FA6hWY4tjEAAQBAgIA=="); spGrid1->PutBackColorHeader(0x4c6c6c6); spGrid1->PutSelBackColor(0x4000000); spGrid1->PutSelForeColor(RGB(0,0,1)); spGrid1->PutCheckImage(EXGRIDLib::Unchecked,16777216); spGrid1->PutCheckImage(EXGRIDLib::Checked,33554432); spGrid1->PutCheckImage(EXGRIDLib::PartialChecked,50331648); spGrid1->PutBackground(EXGRIDLib::exSelBackColorFilter,spGrid1->GetSelBackColor()); spGrid1->PutBackground(EXGRIDLib::exSelForeColorFilter,spGrid1->GetSelForeColor()); spGrid1->PutBackground(EXGRIDLib::exBackColorFilter,spGrid1->GetBackColor()); spGrid1->PutBackground(EXGRIDLib::exForeColorFilter,spGrid1->GetForeColor()); spGrid1->PutBackground(EXGRIDLib::exCursorHoverColumn,-1); spGrid1->PutBackground(EXGRIDLib::exHeaderFilterBarButton,0x4000000); spGrid1->PutBackground(EXGRIDLib::exHeaderFilterBarActive,0x4010101); spGrid1->PutBackground(EXGRIDLib::exFooterFilterBarButton,0x40000ff); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutShowFocusRect(VARIANT_FALSE); spGrid1->PutSortBarVisible(VARIANT_TRUE); spGrid1->PutAllowGroupBy(VARIANT_TRUE); spGrid1->PutBackColorSortBar(spGrid1->GetBackColor()); spGrid1->PutBackColorLevelHeader(spGrid1->GetBackColor()); spGrid1->PutFilterBarDropDownHeight(1); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Check"))); var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutPartialCheck(VARIANT_TRUE); var_Column->PutWidth(128); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterList(EXGRIDLib::exShowCheckBox); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column1->PutFormatColumn(L"1 pos ``"); var_Column1->PutAllowSort(VARIANT_FALSE); var_Column1->PutWidth(48); var_Column1->PutAllowSizing(VARIANT_FALSE); var_Column1->PutAlignment(EXGRIDLib::CenterAlignment); var_Column1->PutHeaderAlignment(EXGRIDLib::CenterAlignment); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Image"))); var_Column2->PutDisplayFilterButton(VARIANT_TRUE); var_Column2->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowCheckBox | EXGRIDLib::exSortItemsAsc)); var_Column2->PutFilterType(EXGRIDLib::exImage); var_Column2->PutDisplayExpandButton(VARIANT_TRUE); var_Column2->PutExpandColumns(L"1,2,3"); var_Column2->PutWidth(128); var_Column2->PutHeaderImage(1); EXGRIDLib::IColumnPtr var_Column3 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Images"))); var_Column3->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column3->PutWidth(196); var_Column3->PutHTMLCaption(L"<img>1</img><img>2</img><img>3</img> Images"); spGrid1->GetColumns()->GetItem("Pos")->PutPosition(3); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long hR = var_Items->AddItem("Root"); var_Items->PutItemDivider(hR,0); var_Items->PutItemDividerLine(hR,EXGRIDLib::EmptyLine); long h = var_Items->InsertItem(hR,vtMissing,"Child A"); var_Items->PutCellImage(h,long(2),1); var_Items->PutCellImages(h,long(3),"1,2,3"); var_Items->PutCellValue(h,long(3),"123"); h = var_Items->InsertItem(hR,vtMissing,"Child B"); var_Items->PutCellState(h,long(0),1); var_Items->PutCellImage(h,long(2),3); var_Items->PutCellImages(h,long(3),"2,3,1"); var_Items->PutCellValue(h,long(3),"231"); var_Items->PutSelectItem(h,VARIANT_TRUE); h = var_Items->InsertItem(hR,vtMissing,"Child C"); var_Items->PutCellImage(h,long(2),2); var_Items->PutCellState(h,long(3),1); var_Items->PutCellValue(h,long(3),"312"); var_Items->PutCellImages(h,long(3),"3,1,2"); var_Items->PutExpandItem(hR,VARIANT_TRUE); spGrid1->EndUpdate(); |
1176 |
ImageSize property on 16 (default) (specifies the size of control' icons/images/check-boxes/radio-buttons)
// AddColumn event - Fired after a new column has been added. void OnAddColumnGrid1(LPDISPATCH Column) { // Column.Def(48) = 2 // Column.Def(49) = 2 } /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutImageSize(16); spGrid1->Images(_bstr_t("gBJJgBAIDAAEg4ACEKAD/hz/EMNh8TIRNGwAjEZAEXjAojJAjMLjABAAgjUYkUnlUrlktl0vmExmUzmk1m03nE5nU7nkrQCAntBoVDolFo1HoM/ADAplLptImdMYFOq") + "dSqlXq1QrVbrlGpVWsFNrNdnNjsk7pQAtNroFnt0sh8Yr9iulTuNxs1Eu8OiT/vsnsNVutXlk/oGGtVKxGLxWNtsZtN8iUYuNvy0Zvd+xNYwdwvl4p870GCqc8vOeuVt" + "tmp1knyOayWVy+WzN/ze1wOElenm+12WUz/Bv2/3UyyWrzeutux2GSyGP2dQ33C1ur3GD3M4zUNzHdlWjq/E3nGzVpjWv4HA7fRy/Tv2IrN8rPW6nZ3ve7mUlfu20Z8a" + "cvQyb+vY9jasYoDwMm+LytVBDqKG3z8O3Cb8P+mkAuY9cCQ2uL4KaxDKvkp8RNLEjqugnrwQo/UWPzFyeQw5sNLZFENrI4kOqU66pw8uzmOKvTqNqjULJvGL1JO48GtT" + "GsbLdEL3scxLlyiw8dQeoUVxdLTtyKmUjwGlslRPJsnK1HbAKbKCrsQo8uQk/CeP44iaR/ATnTNPLvyxPU+z9P9AUDQVBowiofJXQ6Oo+kKMpIkjztE4TKn4P6JowfgP" + "nwD5/nAjB8AOeAPo0eAA1IAFH07UhAIMpYAVIYFHqBUhwVjV1S1EtQAHxW65V0AZwAeuQAnwB5gAPYViEDVhwAHTQBkCjB4gOhwDmCyhH0sACAg=="); EXGRIDLib::IAppearanc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MCcCpCnCCxiA8NYAAmMJfkSbh" + "FCcFpFnGDBnBqRpUhuEwTDeZ5lHCfw6HIQxLCaAxygyJwqgGcATE4FA6hWY4tjEAAQBAgIA=="); spGrid1->PutBackColorHeader(0x4c6c6c6); spGrid1->PutSelBackColor(0x4000000); spGrid1->PutSelForeColor(RGB(0,0,1)); spGrid1->PutBackground(EXGRIDLib::exSelBackColorFilter,spGrid1->GetSelBackColor()); spGrid1->PutBackground(EXGRIDLib::exSelForeColorFilter,spGrid1->GetSelForeColor()); spGrid1->PutBackground(EXGRIDLib::exBackColorFilter,spGrid1->GetBackColor()); spGrid1->PutBackground(EXGRIDLib::exForeColorFilter,spGrid1->GetForeColor()); spGrid1->PutBackground(EXGRIDLib::exCursorHoverColumn,-1); spGrid1->PutBackground(EXGRIDLib::exHeaderFilterBarButton,0x4000000); spGrid1->PutBackground(EXGRIDLib::exHeaderFilterBarActive,0x4010101); spGrid1->PutBackground(EXGRIDLib::exFooterFilterBarButton,0x40000ff); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutShowFocusRect(VARIANT_FALSE); spGrid1->PutSortBarVisible(VARIANT_TRUE); spGrid1->PutAllowGroupBy(VARIANT_TRUE); spGrid1->PutBackColorSortBar(spGrid1->GetBackColor()); spGrid1->PutBackColorLevelHeader(spGrid1->GetBackColor()); spGrid1->PutFilterBarDropDownHeight(1); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Check"))); var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutPartialCheck(VARIANT_TRUE); var_Column->PutWidth(128); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterList(EXGRIDLib::exShowCheckBox); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column1->PutFormatColumn(L"1 pos ``"); var_Column1->PutAllowSort(VARIANT_FALSE); var_Column1->PutWidth(48); var_Column1->PutAllowSizing(VARIANT_FALSE); var_Column1->PutAlignment(EXGRIDLib::CenterAlignment); var_Column1->PutHeaderAlignment(EXGRIDLib::CenterAlignment); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Image"))); var_Column2->PutDisplayFilterButton(VARIANT_TRUE); var_Column2->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowCheckBox | EXGRIDLib::exSortItemsAsc)); var_Column2->PutFilterType(EXGRIDLib::exImage); var_Column2->PutDisplayExpandButton(VARIANT_TRUE); var_Column2->PutExpandColumns(L"1,2,3"); var_Column2->PutWidth(128); var_Column2->PutHeaderImage(1); EXGRIDLib::IColumnPtr var_Column3 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Images"))); var_Column3->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column3->PutWidth(196); var_Column3->PutHTMLCaption(L"<img>1</img><img>2</img><img>3</img> Images"); spGrid1->GetColumns()->GetItem("Pos")->PutPosition(3); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long hR = var_Items->AddItem("Root"); var_Items->PutItemDivider(hR,0); var_Items->PutItemDividerLine(hR,EXGRIDLib::EmptyLine); long h = var_Items->InsertItem(hR,vtMissing,"Child A"); var_Items->PutCellImage(h,long(2),1); var_Items->PutCellImages(h,long(3),"1,2,3"); var_Items->PutCellValue(h,long(3),"123"); h = var_Items->InsertItem(hR,vtMissing,"Child B"); var_Items->PutCellState(h,long(0),1); var_Items->PutCellImage(h,long(2),3); var_Items->PutCellImages(h,long(3),"2,3,1"); var_Items->PutCellValue(h,long(3),"231"); var_Items->PutSelectItem(h,VARIANT_TRUE); h = var_Items->InsertItem(hR,vtMissing,"Child C"); var_Items->PutCellImage(h,long(2),2); var_Items->PutCellState(h,long(3),1); var_Items->PutCellValue(h,long(3),"312"); var_Items->PutCellImages(h,long(3),"3,1,2"); var_Items->PutExpandItem(hR,VARIANT_TRUE); spGrid1->EndUpdate(); |
1175 |
The user clicks the drop-down filter, select a value and the control's list filters for the selected item(s). Is there a way for when the user then goes to the next column to add another filter and the drop down arrow is clicked for the list of values they can filter by to be limited to what is being displayed in the list due to the first filter they set
|
1174 |
Does the control display images from database (ADO)
|
1173 |
Does the control display images from database (DAO)
|
1172 |
Is it possible to set from code, a column sort without being inserted in the sortbar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutColumnAutoResize(VARIANT_FALSE); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library' #import <msado15.dll> rename("EOF","REOF") */ ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset"); rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0); spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs))); spGrid1->PutSortBarVisible(VARIANT_TRUE); spGrid1->PutLayout(L"singlesort=\"C1:1\""); spGrid1->EndUpdate(); |
1171 |
Is it possible to view all events the control fires
// Event event - Notifies the application once the control fires an event. void OnEventGrid1(long EventID) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); OutputDebugStringW( _bstr_t(spGrid1->GetEventParam(-2)) ); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Tasks"))); var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutPartialCheck(VARIANT_TRUE); var_Column->PutDef(EXGRIDLib::exCellValueFormat,long(1)); var_Column->PutFormatColumn(L"value + (%CS0 = 1 ? `<r><fgcolor=808080>(checked)` : ``)"); var_Column->GetEditor()->PutEditType(EXGRIDLib::EditType); spGrid1->PutHeaderVisible(VARIANT_TRUE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Project"); long hChild = var_Items->InsertItem(h,vtMissing,"Task 1"); var_Items->PutSelectItem(hChild,VARIANT_TRUE); hChild = var_Items->InsertItem(h,vtMissing,"Task 2"); var_Items->PutCellState(hChild,long(0),1); hChild = var_Items->InsertItem(h,vtMissing,"Task 3"); var_Items->PutCellState(hChild,long(0),1); var_Items->PutExpandItem(h,VARIANT_TRUE); spGrid1->EndUpdate(); |
1170 |
How can I find all occurences of the giving value, within a column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column->PutFormatColumn(L"1 pos 'A-Z'"); var_Column->PutPosition(0); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutWidth(32); var_Column->PutEnabled(VARIANT_FALSE); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Index"))); var_Column1->PutFormatColumn(L"0 index ''"); var_Column1->PutAllowSizing(VARIANT_FALSE); var_Column1->PutWidth(32); var_Column1->PutEnabled(VARIANT_FALSE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("A"); var_Items->AddItem("A"); var_Items->AddItem("A"); OutputDebugStringW( var_Items->GetCellCaption(var_Items->GetFindItem("A",long(0),long(0)),long(1)) ); OutputDebugStringW( var_Items->GetCellCaption(var_Items->GetFindItem("A",long(0),long(1)),long(1)) ); OutputDebugStringW( var_Items->GetCellCaption(var_Items->GetFindItem("A",long(0),long(2)),long(1)) ); spGrid1->EndUpdate(); |
1169 |
How can I prevent expanding/collapsing the child items
// BeforeExpandItem event - Fired before an item is about to be expanded (collapsed). void OnBeforeExpandItemGrid1(long Item,VARIANT FAR* Cancel) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); Cancel = spGrid1->GetItems()->GetItemParent(Item); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutSingleSel(VARIANT_FALSE); spGrid1->GetColumns()->Add(L"Default"); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(var_Items->InsertItem(h,vtMissing,"Child 1.1"),vtMissing,"Child"); var_Items->InsertItem(h,vtMissing,"Child 1.2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(var_Items->InsertItem(h,vtMissing,"Child 2.1"),vtMissing,"Child"); var_Items->InsertItem(h,vtMissing,"Child 2.2"); var_Items->PutExpandItem(h,VARIANT_TRUE); spGrid1->EndUpdate(); |
1168 |
How can I display the EBN bigger or smaller (thumb)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IAppearancePtr var_Appearance = spGrid1->GetVisualAppearance(); var_Appearance->Add(1,"c:\\exontrol\\images\\normal.ebn"); var_Appearance->Add(10,"CP:1 0 3 0 -3"); var_Appearance->Add(17,"CP:1 3 0 -3 0"); spGrid1->PutBackground(EXGRIDLib::exHSThumb,0xa000000); spGrid1->PutBackground(EXGRIDLib::exVSThumb,0x11000000); spGrid1->PutScrollBars(EXGRIDLib::ScrollBarsEnum(EXGRIDLib::exVScrollEmptySpace | EXGRIDLib::exHScrollEmptySpace | EXGRIDLib::exVScrollOnThumbRelease | EXGRIDLib::exHScrollOnThumbRelease | EXGRIDLib::exDisableBoth)); spGrid1->PutScrollBySingleLine(VARIANT_TRUE); spGrid1->GetColumns()->Add(L"Def"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem(long(1)); var_Items->AddItem(long(2)); var_Items->AddItem(long(3)); spGrid1->EndUpdate(); |
1167 |
I am using GroupBy feature to create a tree, but the top rows are aligned with the children, not indented. What could be wrong
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. void OnAddGroupItemGrid1(long Item) { // AddBar(Item,"Progress", #12/2/2017#,#12/2/2017#) // DefineSummaryBars(Item,"", -3, "") // Chart.ItemBackColor(Item) = color /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); _bstr_t color = 14474460; EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutItemDivider(Item,-1); var_Items->PutCellValue(Item,long(1),var_Items->GetCellCaption(Item,var_Items->GetGroupItem(Item))); var_Items->PutItemBold(Item,VARIANT_TRUE); var_Items->PutItemBackColor(Item,color); } // AddItem event - Occurs after a new Item has been inserted to Items collection. void OnAddItemGrid1(long Item) { // AddBar(Item,"Task",#12/4/2017#,#12/10/2017#) // ItemBar(Item,"", 514) = ItemToIndex(Item) EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); var_Columns->Add(L"C1"); var_Columns->Add(L"C2"); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); spGrid1->PutSortBarVisible(VARIANT_TRUE); spGrid1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column."); spGrid1->PutAllowGroupBy(VARIANT_TRUE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Item A"); var_Items->PutCellValue(h,long(1),"SubItem A.1"); h = var_Items->AddItem("Item A"); var_Items->PutCellValue(h,long(1),"SubItem A.1"); h = var_Items->AddItem("Item A"); var_Items->PutCellValue(h,long(1),"SubItem A.1"); h = var_Items->AddItem("Item A"); var_Items->PutCellValue(h,long(1),"SubItem A.1"); h = var_Items->AddItem("Item B"); var_Items->PutCellValue(h,long(1),"SubItem B.1"); h = var_Items->AddItem("Item B"); var_Items->PutCellValue(h,long(1),"SubItem B.1"); spGrid1->GetColumns()->GetItem(long(0))->PutSortOrder(EXGRIDLib::SortAscending); spGrid1->EndUpdate(); |
1166 |
How can I display an item of picture type
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); spGrid1->PutScrollBySingleLine(VARIANT_FALSE); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutHeaderHeight(24); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Artikel")))->PutHTMLCaption(L"<u>Artikel"); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Waarde")))->PutHTMLCaption(L"<u>Waarde"); spGrid1->PutHTMLPicture(L"T22128","c:\\exontrol\\images\\zipdisk.gif"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("T22128-28)2D"); long h1 = var_Items->InsertItem(h,vtMissing,"<img>T22128:128</img>"); var_Items->PutCellValueFormat(h1,long(0),EXGRIDLib::exHTML); var_Items->PutItemHeight(h1,128); h1 = var_Items->InsertItem(h,vtMissing,"werkvoorbereiding"); var_Items->PutCellValue(h1,long(1),"5.80"); var_Items->PutCellBold(h1,long(1),VARIANT_TRUE); var_Items->PutCellValue(var_Items->InsertItem(h1,vtMissing,"Type"),long(1),"Eenvoudig"); var_Items->PutCellValue(var_Items->InsertItem(h1,vtMissing,"Prijs p/uur"),long(1),"60,00"); var_Items->PutCellValue(var_Items->InsertItem(h1,vtMissing,"Marhe"),long(1),"15,00%"); var_Items->PutCellValue(var_Items->InsertItem(h1,vtMissing,"Insteltijd min."),long(1),"5,00"); var_Items->PutCellValue(var_Items->InsertItem(h1,vtMissing,"Aantal"),long(1),long(1)); var_Items->PutCellValue(var_Items->InsertItem(h1,vtMissing,"Kostprije"),long(1),"5,00"); var_Items->PutExpandItem(h1,VARIANT_TRUE); h1 = var_Items->InsertItem(h,vtMissing,"materiall"); var_Items->PutCellValue(h1,long(1),"14.82"); var_Items->PutCellBold(h1,long(1),VARIANT_TRUE); var_Items->PutItemHasChildren(h1,VARIANT_TRUE); h1 = var_Items->InsertItem(h,vtMissing,"snijden"); var_Items->PutCellValue(h1,long(1),"3.13"); var_Items->PutCellBold(h1,long(1),VARIANT_TRUE); var_Items->PutItemHasChildren(h1,VARIANT_TRUE); var_Items->PutExpandItem(h,VARIANT_TRUE); spGrid1->EndUpdate(); |
1165 |
Dark mode
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); _bstr_t back = 65536; _bstr_t fore = 16777215; spGrid1->GetVisualAppearance()->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABXUIQAAYAQGKIcBiAKBQAGYBIJDEMgzDDAUBjKKocQTC4AIQjCK4JDKHYJRpHEZyCA8EhqGASRAFUQBYiWE4oSpLABQaK0ZwIGyRIrkGQgQ") + "gmPYDSDNU4zVIEEglBI0TDNczhNDENgtGYaJqHIYpZBcM40TKkEZoSIITZcRrOEBiRL1S0RBhGcRUHZlWzdN64LhuK47UrWdD/XhdVzXRbjfz1Oq+bxve48Br7A5yYTh" + "dr4LhOFQ3RjIL4xbIcUwGe6VZhjOLZXjmO49T69HTtOCYBEBA"); spGrid1->GetVisualAppearance()->Add(2,_bstr_t("gBFLBCJwBAEHhEJAAEhABPMIQAAYAQGKIcBiAKBQAGaAoDDcMgwQwAAxjIKUEwsACEIrjKCYVgOHYYQjGMZwHCMIhiGwcAChEZYHgkMYmDAMUhSE78axHG6PY7kKZ4b") + "iaKIqQLLEhSfJ0YyBECBZpfebIbjmIZMSLEIxDKItJSpCIaRgqWS6ahGO4JUbUFLQHT9IR4daIYRgEEBA"); spGrid1->GetVisualAppearance()->Add(3,_bstr_t("gBFLBCJwBAEHhEJAAEhABUUIQAAYAQGKIcBiAKBQAGaAoDDcMgwQwAAxjIKUEwsACEIrjKCYVgOHYYQjGMZwGAsEwjAoYAChEaILgkMw2DBIQwgJIMEr/G6RZxjeL5C") + "jmG4nDhKMpybAcXxjBIYZJgOQpXb+PobTrNNLzfRFAxVAaWJikcZ4HpIAJNVLFdQ0XYMNSBISsBqrKiKcpeIIDWBZMbRZT1ZABCIZBpEW6LahENQwXrCN74DYkNTdKax" + "bbuaaXLhGCYBgIA=="); spGrid1->PutHeaderAppearance(EXGRIDLib::Bump); spGrid1->PutBackColor(back); spGrid1->PutBackColorHeader(back); spGrid1->PutBackColorLevelHeader(back); spGrid1->PutBackColorSortBar(back); spGrid1->PutBackColorSortBarCaption(back); spGrid1->PutFilterBarBackColor(back); spGrid1->PutFilterBarForeColor(fore); spGrid1->PutForeColor(fore); spGrid1->PutForeColorHeader(fore); spGrid1->PutForeColorSortBar(fore); spGrid1->PutSelBackColor(fore); spGrid1->PutSelForeColor(back); spGrid1->PutBackground(EXGRIDLib::exHeaderFilterBarButton,0x1000000); spGrid1->PutBackground(EXGRIDLib::exCursorHoverColumn,-1); spGrid1->PutBackground(EXGRIDLib::exToolTipAppearance,0x3000000); spGrid1->PutBackground(EXGRIDLib::exToolTipBackColor,back); spGrid1->PutBackground(EXGRIDLib::exToolTipForeColor,fore); spGrid1->PutBackground(EXGRIDLib::exSelBackColorFilter,fore); spGrid1->PutBackground(EXGRIDLib::exSelForeColorFilter,back); spGrid1->PutBackground(EXGRIDLib::exBackColorFilter,back); spGrid1->PutBackground(EXGRIDLib::exForeColorFilter,fore); spGrid1->PutBackground(EXGRIDLib::exSortBarLinkColor,back); spGrid1->PutBackground(EXGRIDLib::exScrollSizeGrip,back); spGrid1->PutDescription(EXGRIDLib::exFilterBarExclude,L"<bgcolor 0><fgcolor ffffff> Exclude </fgcolor></bgcolor>"); spGrid1->EndUpdate(); |
1164 |
I have changed the font, but the item's height remains the same. What I am doing wrong
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutColumnAutoResize(VARIANT_FALSE); spGrid1->LoadXML("http://www.exontrol.net/testing.xml"); spGrid1->GetFont()->PutSize(_variant_t(long(22))); spGrid1->PutHeaderHeight(42); spGrid1->PutDefaultItemHeight(36); spGrid1->GetItems()->PutItemHeight(0,spGrid1->GetDefaultItemHeight()); spGrid1->EndUpdate(); |
1163 |
How can I specify the cell's outline, border or lines around, when the cell gets selected
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->AttachTemplate("handle AddColumn(Column){Column{Def(48)=4;Def(49)=4;}}"); EXGRIDLib::IAppearancePtr var_Appearance = spGrid1->GetVisualAppearance(); var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSpEEg7BKMYwjOJgFgmEQxDANIBQSKoaQiGQYYLhEZAEiONoaDJCM4wH") + "IMQxHCKTZRkGcfaRCGSfIzpGKpVgOTYiTbPcIyQKtBxDIydJTmeQQQhsFIJU7SdVUPDUJZlWbLAwWTAYazXCKRZBpeJqdo6Y5RUDKUqSdLUYyvEq7ZqnOIpw5vICpaCq" + "Op6HqKFpiXSAFL1fLmAwvPKrJjoeqpWpyCaRZQAGg4dbEdTNNCIbatQANKrCSpgZ7sMB6Di2L4TPS2awoWgRYyTFZMbBAeQ7LC1c45Fqrd4zS4dSxKCahcLxFiaNpYZY" + "njUap1jGPJlkuAgAkidB3nceZsCQEQJCgGhMGcQ4pkiSxEAAOYpiQIhvkYNA2gSCg5n+LIoGILowFyXQoAYAoAmASAWAaAZgggJgKF2T54DYDoDmECBGBKBJgGgTgWgW" + "YRoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChixULILGGGAWDCCgjCiTgrg0YxojoC4OmOSJ2D6D5kAgJLFgABAEICA="); var_Appearance->Add(2,"CP:1 -4 0 0 0"); spGrid1->PutSelBackColor(0x2000000); spGrid1->PutSelForeColor(RGB(0,0,1)); spGrid1->PutFullRowSelect(EXGRIDLib::exColumnSel); spGrid1->PutShowFocusRect(VARIANT_FALSE); spGrid1->PutDefaultItemHeight(24); spGrid1->PutHeaderHeight(24); spGrid1->PutDrawGridLines(EXGRIDLib::exVLines); spGrid1->GetColumns()->Add(L"C1"); spGrid1->GetColumns()->Add(L"C2"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem("Cell 1"),long(1),"Cell 2"); var_Items->PutCellValue(var_Items->AddItem("Cell 3"),long(1),"Cell 4"); spGrid1->GetItems()->PutSelectPos(long(1)); spGrid1->PutSelectColumnIndex(1); spGrid1->EndUpdate(); |
1162 |
How can I specify the cell's outline, border or lines around, when the item gets selected
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->AttachTemplate("handle AddColumn(Column){Column{Def(48)=4;Def(49)=4;}}"); spGrid1->GetVisualAppearance()->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSpEEg7BKMYwjOJgFgmEQxDANIBQSKoaQiGQYYLhEZAEiONoaDJCM4wH") + "IMQxHCKTZRkGcfaRCGSfIzpGKpVgOTYiTbPcIyQKtBxDIydJTmeQQQhsFIJU7SdVUPDUJZlWbLAwWTAYazXCKRZBpeJqdo6Y5RUDKUqSdLUYyvEq7ZqnOIpw5vICpaCq" + "Op6HqKFpiXSAFL1fLmAwvPKrJjoeqpWpyCaRZQAGg4dbEdTNNCIbatQANKrCSpgZ7sMB6Di2L4TPS2awoWgRYyTFZMbBAeQ7LC1c45Fqrd4zS4dSxKCahcLxFiaNpYZY" + "njUap1jGPJlkuAgAkidB3nceZsCQEQJCgGhMGcQ4pkiSxEAAOYpiQIhvkYNA2gSCg5n+LIoGILowFyXQoAYAoAmASAWAaAZgggJgKF2T54DYDoDmECBGBKBJgGgTgWgW" + "YRoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChixULILGGGAWDCCgjCiTgrg0YxojoC4OmOSJ2D6D5kAgJLFgABAEICA="); spGrid1->PutSelBackColor(0x1000000); spGrid1->PutSelForeColor(RGB(0,0,1)); spGrid1->PutShowFocusRect(VARIANT_FALSE); spGrid1->PutDefaultItemHeight(24); spGrid1->PutHeaderHeight(24); spGrid1->PutDrawGridLines(EXGRIDLib::exVLines); spGrid1->GetColumns()->Add(L"C1"); spGrid1->GetColumns()->Add(L"C2"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem("Cell 1"),long(1),"Cell 2"); var_Items->PutCellValue(var_Items->AddItem("Cell 3"),long(1),"Cell 4"); var_Items->PutSelectPos(long(1)); spGrid1->EndUpdate(); |
1161 |
How can I specify the cell's outline, border or lines around
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->AttachTemplate("handle AddColumn(Column){Column{Def(48)=4;Def(49)=4;}}"); spGrid1->GetVisualAppearance()->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSpEEg7BKMYwjOJgFgmEQxDANIBQSKoaQiGQYYLhEZAEiONoaDJCM4wH") + "IMQxHCKTZRkGcfaRCGSfIzpGKpVgOTYiTbPcIyQKtBxDIydJTmeQQQhsFIJU7SdVUPDUJZlWbLAwWTAYazXCKRZBpeJqdo6Y5RUDKUqSdLUYyvEq7ZqnOIpw5vICpaCq" + "Op6HqKFpiXSAFL1fLmAwvPKrJjoeqpWpyCaRZQAGg4dbEdTNNCIbatQANKrCSpgZ7sMB6Di2L4TPS2awoWgRYyTFZMbBAeQ7LC1c45Fqrd4zS4dSxKCahcLxFiaNpYZY" + "njUap1jGPJlkuAgAkidB3nceZsCQEQJCgGhMGcQ4pkiSxEAAOYpiQIhvkYNA2gSCg5n+LIoGILowFyXQoAYAoAmASAWAaAZgggJgKF2T54DYDoDmECBGBKBJgGgTgWgW" + "YRoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChixULILGGGAWDCCgjCiTgrg0YxojoC4OmOSJ2D6D5kAgJLFgABAEICA="); spGrid1->PutSelBackMode(EXGRIDLib::exTransparent); spGrid1->PutShowFocusRect(VARIANT_FALSE); spGrid1->PutDefaultItemHeight(24); spGrid1->PutHeaderHeight(24); spGrid1->PutDrawGridLines(EXGRIDLib::exVLines); spGrid1->GetColumns()->Add(L"C1"); spGrid1->GetColumns()->Add(L"C2"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem("Cell 1"),long(1),"Cell 2"); long h = var_Items->AddItem("Cell 2"); var_Items->PutCellValue(h,long(1),"Cell 3"); var_Items->PutCellBackColor(h,long(1),0x1000000); spGrid1->EndUpdate(); |
1160 |
Is it possible to highligth the match while a filter is applied
// AddColumn event - Fired after a new column has been added. void OnAddColumnGrid1(LPDISPATCH Column) { // Column.Def(17) = 1 } // FilterChange event - Occurs when filter was changed. void OnFilterChangeGrid1() { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); _variant_t format = spGrid1->FormatABC(L"`value replace '` + value + `' with '<bgcolor 000000><fgcolor FFFFFF>` + value + `</fgcolor></bgcolor>'`",spGrid1->GetFilterBarPromptPattern(),vtMissing,vtMissing); spGrid1->GetColumns()->GetItem(long(0))->PutFormatColumn(L"format"); spGrid1->GetColumns()->GetItem(long(1))->PutFormatColumn(L"format"); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutDrawGridLines(EXGRIDLib::exVLines); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->GetColumns()->Add(L"Col 1"); spGrid1->GetColumns()->Add(L"Col 2"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem("219 Smith"),long(1),"Ignacio 1234"); var_Items->PutCellValue(var_Items->AddItem("1666 County Road 309A"),long(1),"897 Manassa"); var_Items->PutCellValue(var_Items->AddItem("38 Lone Pine"),long(1),"Durango 11"); var_Items->PutCellValue(var_Items->AddItem("612 Jachim Street"),long(1),"Lamar 222"); spGrid1->PutFilterBarPromptPattern(L"1"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarCompact | EXGRIDLib::exFilterBarSingleLine | EXGRIDLib::exFilterBarVisible | EXGRIDLib::exFilterBarPromptVisible)); spGrid1->PutFilterBarPromptType(EXGRIDLib::FilterPromptEnum(EXGRIDLib::exFilterPromptCaseSensitive | EXGRIDLib::exFilterPromptContainsAll)); spGrid1->EndUpdate(); |
1159 |
How can I replace the cell's context menu ( while edit mode is running )
// RClick event - Fired when right mouse button is clicked void OnRClickGrid1() { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); OutputDebugStringW( L"Edit Mode: " ); OutputDebugStringW( _bstr_t(spGrid1->GetEditing()) ); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'EXCONTEXTMENULib' for the library: 'ExContextMenu 1.0 Type Library' #import <ExContextMenu.dll> using namespace EXCONTEXTMENULib; */ EXCONTEXTMENULib::IExContextMenuPtr var_ExContextMenu = ::CreateObject(L"Exontrol.ContextMenu"); var_ExContextMenu->GetItems()->PutToString(L"Check[chk],[sep],Item 1,Item 2,Item 3,Popup(A,B,C)"); OutputDebugStringW( _bstr_t(var_ExContextMenu->Select(vtMissing,vtMissing,vtMissing)) ); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderAppearance(EXGRIDLib::Flat); EXGRIDLib::IEditorPtr var_Editor = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Column")))->GetEditor(); var_Editor->PutEditType(EXGRIDLib::EditType); var_Editor->PutOption(EXGRIDLib::exEditAllowContextMenu,VARIANT_FALSE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item 1"); var_Items->AddItem("Item 2"); spGrid1->EndUpdate(); |
1158 |
Is it possible to highlight the column's header once a filter is applied (sample 2)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IAppearancePtr var_Appearance = spGrid1->GetVisualAppearance(); var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABO8GACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSKUOQTDKNYykCIRSDUJYkSZEIyjBI8ExXFqNACkGKwQgmNYDSBMcbwS") + "AsXRYFocJ5gOT6AjKBA2UclEZpajiTY3ABUEgUS5oOBIACqariaQJAAiCRQGiYZyHKaRSwPBKFYDIIjbJheTIDChNVxUcDENQjJqLBIDRzbarye59YBfeBXdgmA4LQbD" + "MRwNgMMQTDqKYbkOQZHbeGKAWTMEZzJj8cxTEqIaBhGTLfojSZMS7UGK1LLtMyHI6kP7sOiLfi2W4/W7XV72F79TzXIa2ZBuO57bhnAZ/VzGNj4PRNezfRqicjsGxcZw" + "Xg+TpQj0ew6gSOw7wSbozjsfYXi8PwMnSc52leHotl+MxjmoXh2nybxOH+SQtnYXx+D2P4vGMB56hQf5PCgBYeDwYBCEo1xggebgKH6IIDBYBgkiAQ5FgYPAhEIRgWGq" + "DBoC4GoCiGCBYhGBQPAWdIQp0eIUiWCZigiJgqgqYpIioJQhmIMhBH0NxjEMag2g2Y4ImYOoOmOSJeDQNxXlOLR3ECUAQICA="); var_Appearance->Add(2,_bstr_t("gBFLBCJwBAEHhEJAAEhABgsHQAAYAQGKIcBiAKBQAGaAoDDYNwwQwAAxDAKcEwsACEIrjKCRShyCYZRrGUgRCKQahLEiTIhGUYJHgmK4tRoAUgxWCEExrAaQJjjeCQF") + "i6LAtDhPMByfQEZQIGyjkgjNLUcSbG4AKgkCiXfpUAJVP7FcgSABEEigNIxToOU4jFgeCYLQKQRK2RC9GQGFCbLhpYKIahGTYWVheN5XXblez9P7ABQwKCcAwXBp7YIK" + "AT4XBIdYdQ7IL4xGA0AJPFoJC7mOQ5XiYAIBAZ/RL0LCcbxHHafVboQj6JouD5PUDVNY1XBdPynI6CbLhWy6Dq4UZzPwzeBifSHfDjRoJcCZe71KY3GwSEboNA6Kp+QB" + "HAmZoZjSPYIEiF47lOLJVnuYofBwJJHmaQoYj0MIRHeM4/m6cJ8B+fpBHQJ5SGKPYYH8OYMk+P5Bn4fxaAYZAvEIX4RgUWBGgCCAmAqApgkgNgOgMEYlGASoEkQeBWBa" + "BZhggZgagaYRoEwShWA6NZZAMQBAICA=="); spGrid1->PutBackground(EXGRIDLib::exHeaderFilterBarButton,0x1000000); spGrid1->PutBackground(EXGRIDLib::exHeaderFilterBarActive,0x2000000); spGrid1->PutBackground(EXGRIDLib::exCursorHoverColumn,-1); spGrid1->PutHeaderHeight(28); spGrid1->PutBackColorHeader(RGB(255,255,255)); spGrid1->PutDrawGridLines(EXGRIDLib::exRowLines); spGrid1->PutHeaderVisible(VARIANT_TRUE); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"C1")))->PutDisplayFilterButton(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"C2"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilter(L"Item 2"); var_Column->PutFilterType(EXGRIDLib::exFilter); ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"C3")))->PutDisplayFilterButton(VARIANT_TRUE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Item 1"); var_Items->PutCellValue(h,long(1),"Item 2"); var_Items->PutCellValue(h,long(2),"Item 3"); h = var_Items->AddItem("Item 4"); var_Items->PutCellValue(h,long(1),"Item 5"); var_Items->PutCellValue(h,long(2),"Item 6"); spGrid1->ApplyFilter(); spGrid1->EndUpdate(); |
1157 |
How can I make the expand/collapse glyphs DPI aware
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); _bstr_t size = 2; spGrid1->BeginUpdate(); EXGRIDLib::IAppearancePtr var_Appearance = spGrid1->GetVisualAppearance(); var_Appearance->Add(3,_bstr_t("gBFLBCJwBAEHhEJAAEhEGAUHQAAYAQGKIcBiAKBQAGaAoDDYOA4QwAAxDAKcEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQiiCYsS5GQBRfIUEghGyNZjgNzQc") + "CQAI8T5IUgARBJIDSMY6DpOIxYHgmC4DEITNLxOK0EhRHCBZrgOCAYhqEY1Ro+dhPFYjVTMdK0LRtKy7Mq2aJmOpZDxWE7dZKpO5fbxXS67cr2fp/YBed4rfa7KTlOBK" + "cRQRBEFQPDqPZBkORZHh2FoLRJKbgtHJmHYNQWhVyYBbNCyTI6lahpeuHBx1QaWWxjbCMEr6bpoWLbFi3Ha1UzrPa8b5vSw7Gr+HzYQTHGPXGqaYJdZrnea6B7+U5XUJ" + "rnSOZciYHwhAeR5HDK+JVGqKRRmScx5HyfRei+H5bmmcp4Fi8o/CGGJKGQKZUGoFQigUPIiCeSZXnyHB6l0SAJn8JxfkIeZ5CgXxjCCAhyB8QgIlAM4MlKAIcCaIBIGY" + "GoGGEYhqBMMxgnICgRDUDQjESGwmAkWBuCqBoiHIVgkDQYgYESWg2E0YhohcJQigITg3CQSRyEyEYGGOWJwhQJD4FiFIMk0aJFGsIBkkOBJeDc+AchYJwJgIWhSgYZQp" + "FIVoVGOGQ4l2EwIBWMhgDmDhThCEwkAiaJchKDhjhgZhsCUY4iFCEoZkiaYQmSGAWhWQhgDuDpTjCDQiEgchAg0IpJBoDoFiEKBqCaCAimgIguH8IZnkPUhcBcJg+hGJ" + "ZnloYJsiaKZKGa24YnWSR0CkKhCA2CxlCqColhAYpqEKER0DqVZ0A0ASAgA=="); var_Appearance->Add(4,_bstr_t("gBFLBCJwBAEHhEJAAEhABAQCg6AADACAxRDgMQBQKAAzQFAYbBwHCGAAGIYBTgmFgAQhFcZQSKUOQTDKNYykCIRSDUJYkSZEIyjBI8ExXFqNACjeQYJBCNYbTJAbqhY") + "IgAR3HqQZABCCSQKkYx0HScRiwPBMFwGIQmaaicZoJCiN4DTZAcIBRDUIxpDR9bBeKw3KqVaZnWhaNpWXZlTzKdSxXisF67RZSdi/XgvF5XXblez9P69LwXe5mUrGbyV" + "YghCCIKgeG4dR7IMhyLDcKQXCCVW7aGSsOwbAqAXpdGAXTQdDyLJKnaZqOi6BjjA4rNbHGIYJb1XTRMa1LJuG5LJrOeZ3Xre4BLfh1VoFRpjWIYNY1QS7TLOczzfRdDx" + "TiGVpkjCeJoD4Ng1hSRxiisVRKg8D4PkWZJznmPQ+F8Xx5guWpjHGWYMiYQodEaIRSCgU5KCSeh3naHB/iAAh9n8fwfgIeZ1CgXwjCCAhxl8AgIlAM4MlKAIcCaD54FY" + "FoFmGCBmBaBIJigPJNgKSAoDSVC+BIbIYCUYYoiYKoJgkWIMlGCAglMaJZDWCYiFyFIJkkOJYhEJc7G4PYPCOaJshQJBjgiVIUgyDRokEaggGSQ4El4N1CBiFgnAmAha" + "FKFZlFkShUhWJRYmITg3GSQgFGuGBOGOFJkCSSQCDoNgkiOCY0hUJJmmmQhvhqZtYmUOQmBWIRvhgTpjjSbAjEiEgchBZgyEaBIhigWgegqIhIjoDILiACB5nTL5WnWR" + "YOiSKYJnqGQ7CmOh2hqJ5OkYORxFyShKhSAxihkOomioY5YiqFIkFyTo1HkAxAEAgIA=="); var_Appearance->Add(1,spGrid1->FormatABC(L"`CP:3 -` + int(value*dpi) + ` -` + int(value*dpi) + ` ` + int(value*dpi) + ` ` + int(value*dpi)",size,vtMissing,vtMissing)); var_Appearance->Add(2,spGrid1->FormatABC(L"`CP:4 -` + int(value*dpi) + ` -` + int(value*dpi) + ` ` + int(value*dpi) + ` ` + int(value*dpi)",size,vtMissing,vtMissing)); spGrid1->PutLinesAtRoot(EXGRIDLib::exGroupLinesAtRoot); spGrid1->PutHasButtons(EXGRIDLib::exCustom); spGrid1->PutHasButtonsCustom(VARIANT_FALSE,16777216); spGrid1->PutHasButtonsCustom(VARIANT_TRUE,33554432); spGrid1->GetColumns()->Add(L"Column"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,vtMissing,"Child"); spGrid1->EndUpdate(); |
1156 |
Is it possible to highlight the column's header once a filter is applied (sample 1)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IAppearancePtr var_Appearance = spGrid1->GetVisualAppearance(); var_Appearance->Add(2,_bstr_t("gBFLBCJwBAEHhEJAAEhABX8GACAADACAxSDEMQBQKAAzQFAYbhgHCGAAGQaBUgmFgAQhFcZQSKUOQTDKNYykCIRSDUJYkSZEIyjBI8ExXFqNACkGKwYgmNYiTLAcgAN") + "J0WBaGIZJ4gOT5fDKMoEDRRYADFCscwxJybQAqGQKKb+VgAVY/cTyBIAEQSKA0TDOQ5TSKWB4JPZQRBEbZMNBtBIUJquKaqShdQJCU5FdY3Xblez9P7AMBwLFEC4NQ8Y" + "NYuPhjR4dRTIMhvVAsUArFh8Zg9GZZFjmDIDT4ydBLTQwcyVIKnP5qOa6XbmPoCQDYKxZHYxPzVDa3axuL76dqCAT7XrXNy1TbNRrzQKfcJqfCbdw2YaDZLOOT3fjuI4" + "hhKaRzFAHJ+jYQ4xHuY4gHuGIXGeExqC8Tp6C+PoEm+G5ImycRgh0XwvDGa5rgOeoejyXwnFeQp2mkf5ClgBB9gCWIYAwfYAEKV58mkdwOggNArgOXY2EWLoDkKOA0mg" + "bhOGgZApgaSBIHWSYHSmbApgYThmESZYJkIeIkgeCpfliLIHgpMIcmUYYYmODAlg2SI4mWfRfGOEguDcCRjFYAJihCQhJBSDoRmONgKEcI4kFCEJhhOVYTmYnAlEAQhW" + "BMJYJGYWoWmWSR2F6F5lnkWAQhUAgpEieRWEuSYkjWGpmkmNhuhuZwJkYcocmaaYkjyEhngnUA6lEFAlAEgI="); var_Appearance->Add(1,"CP:2 -8 -4 2 4"); spGrid1->PutBackground(EXGRIDLib::exHeaderFilterBarButton,0x1fefefe); spGrid1->PutBackground(EXGRIDLib::exHeaderFilterBarActive,0x1010101); spGrid1->PutBackground(EXGRIDLib::exCursorHoverColumn,-1); spGrid1->PutHeaderHeight(28); spGrid1->PutBackColorHeader(RGB(255,255,255)); spGrid1->PutDrawGridLines(EXGRIDLib::exRowLines); spGrid1->PutHeaderVisible(VARIANT_TRUE); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"C1")))->PutDisplayFilterButton(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"C2"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilter(L"Item 2"); var_Column->PutFilterType(EXGRIDLib::exFilter); ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"C3")))->PutDisplayFilterButton(VARIANT_TRUE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Item 1"); var_Items->PutCellValue(h,long(1),"Item 2"); var_Items->PutCellValue(h,long(2),"Item 3"); h = var_Items->AddItem("Item 4"); var_Items->PutCellValue(h,long(1),"Item 5"); var_Items->PutCellValue(h,long(2),"Item 6"); spGrid1->ApplyFilter(); spGrid1->EndUpdate(); |
1155 |
How do I update itemcount and matchitemcount of the FilterBarCaption after I added the item using the AddItem method
// Click event - Occurs when the user presses and then releases the left mouse button over the grid control. void OnClickGrid1() { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetItems()->AddItem("new"); spGrid1->Refresh(); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Item"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox | EXGRIDLib::exSortItemsAsc)); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column1->PutAllowSizing(VARIANT_FALSE); var_Column1->PutAllowSort(VARIANT_FALSE); var_Column1->PutWidth(32); var_Column1->PutFormatColumn(L"1 apos ``"); var_Column1->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item A"); var_Items->AddItem("Item B"); var_Items->AddItem("Item C"); spGrid1->PutFilterBarCaption(_bstr_t("`<r>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `<br>` : `` ) + `<r>` + abs(matchitemcount + 1") + ") + ` result(s)` ) : (`<fgcolor=808080>`+ itemcount + ` item(s)`) )"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarCompact | EXGRIDLib::exFilterBarShowCloseOnRight | EXGRIDLib::exFilterBarShowCloseIfRequired | EXGRIDLib::exFilterBarCaptionVisible | EXGRIDLib::exFilterBarVisible | EXGRIDLib::exFilterBarPromptVisible)); spGrid1->EndUpdate(); |
1154 |
I can't get values in the column properly centered. What can be the problem
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutTreeColumnIndex(-1); spGrid1->PutDrawGridLines(EXGRIDLib::exRowLines); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Default"))); var_Column->PutAlignment(EXGRIDLib::CenterAlignment); var_Column->PutFormatColumn(L"ltrim(rtrim(value))"); spGrid1->GetItems()->AddItem("item 1 "); spGrid1->GetItems()->AddItem(" item 2"); spGrid1->GetItems()->AddItem(" item 3 "); spGrid1->EndUpdate(); |
1153 |
The Edit method does not work while ReadOnly property is exLocked and the first column is hidden. Is there any fix
// DblClick event - Occurs when the user dblclk the left mouse button over an object. void OnDblClickGrid1(short Shift,long X,long Y) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); long var_ItemFromPoint = spGrid1->GetItemFromPoint(-1,-1,c,hit); spGrid1->PutFocusColumnIndex(c); spGrid1->Edit(vtMissing); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutAutoEdit(VARIANT_FALSE); spGrid1->PutReadOnly(EXGRIDLib::exLocked); spGrid1->PutAutoSearch(VARIANT_TRUE); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"")))->PutVisible(VARIANT_FALSE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Contains"))); var_Column->PutAutoSearch(EXGRIDLib::exContains); var_Column->GetEditor()->PutEditType(EXGRIDLib::EditType); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem(vtMissing),long(1),"Tom Hanks"); var_Items->PutCellValue(var_Items->AddItem(vtMissing),long(1),"Leonardo DiCaprio"); var_Items->PutCellValue(var_Items->AddItem(vtMissing),long(1),"Will Smith"); var_Items->PutCellValue(var_Items->AddItem(vtMissing),long(1),"Tom Cruise"); spGrid1->EndUpdate(); |
1152 |
How can I enable the Undo/Redo feature
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutAllowUndoRedo(VARIANT_TRUE); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"P1"))); var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutPartialCheck(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"P2"))); var_Column1->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column1->PutPartialCheck(VARIANT_TRUE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->AddItem("Press CTRL + Z for Undo, and CTRL + Y for Redo"); spGrid1->EndUpdate(); |
1151 |
The incremental search feature is no working for columns with editor assigned. What can be done
// DblClick event - Occurs when the user dblclk the left mouse button over an object. void OnDblClickGrid1(short Shift,long X,long Y) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->Edit(vtMissing); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutAutoEdit(VARIANT_FALSE); spGrid1->PutAutoSearch(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Contains"))); var_Column->PutAutoSearch(EXGRIDLib::exContains); var_Column->GetEditor()->PutEditType(EXGRIDLib::EditType); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Tom Hanks"); var_Items->AddItem("Leonardo DiCaprio"); var_Items->AddItem("Will Smith"); var_Items->AddItem("Tom Cruise"); spGrid1->EndUpdate(); |
1150 |
Each item is representated by a key as string. Is it possible to have a drop down editor to display more information when using the item's key
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); EXGRIDLib::IEditorPtr var_Editor = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Multiple-Columns Tree DropDownListType")))->GetEditor(); var_Editor->PutEditType(EXGRIDLib::DropDownListType); var_Editor->AddItem(0,L"KR|Korea, Republic of",vtMissing); var_Editor->AddItem(1,L"MO|Macao",vtMissing); var_Editor->AddItem(2,L"SA|Saudi Arabia",vtMissing); var_Editor->AddItem(3,L"EG|Egypt",vtMissing); var_Editor->AddItem(4,L"GB|United Kingdom",vtMissing); var_Editor->AddItem(5,L"GT|Guatemala",vtMissing); var_Editor->AddItem(6,L"SR|Suriname",vtMissing); var_Editor->AddItem(7,L"BM|Bermuda",vtMissing); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("EG"); var_Items->AddItem("GB"); var_Items->AddItem("BM"); spGrid1->EndUpdate(); |
1149 |
My table includes codes/keys for items, can I display a drop down editor to include more information
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); EXGRIDLib::IEditorPtr var_Editor = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Multiple-Columns DropDownListType")))->GetEditor(); var_Editor->PutEditType(EXGRIDLib::DropDownListType); var_Editor->PutDropDownAutoWidth(EXGRIDLib::exDropDownEditorWidth); var_Editor->PutOption(EXGRIDLib::exDropDownColumnCaption,"City¦Coordinates¦State"); var_Editor->AddItem(0,L"JV3|Jollyville¦3026N 09746W¦Texas",vtMissing); var_Editor->AddItem(1,L"TMO|Altamont¦4021N 11017W¦Utah",vtMissing); var_Editor->AddItem(2,L"IIM|Williamston¦4241N 08417W¦Michigan",vtMissing); var_Editor->AddItem(3,L"IWN|Merrittstown¦3958N 07952W¦Pennsylvania",vtMissing); var_Editor->AddItem(4,L"HOU|Houston¦2945N 09521W¦Texas",vtMissing); var_Editor->AddItem(5,L"GSF|Gales Ferry¦4125N 07205W¦Connecticut",vtMissing); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("HOU"); var_Items->AddItem("IIM"); var_Items->AddItem("TMO"); spGrid1->EndUpdate(); |
1148 |
How can I display and select from a multiple-columns tree editor
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") + "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" + "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); EXGRIDLib::IEditorPtr var_Editor = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Multiple-Columns Tree DropDownListType")))->GetEditor(); var_Editor->PutEditType(EXGRIDLib::DropDownListType); var_Editor->PutDropDownAutoWidth(EXGRIDLib::exDropDownEditorWidth); var_Editor->PutOption(EXGRIDLib::exDropDownColumnCaption,"Name¦Title¦City¦Phone"); var_Editor->PutOption(EXGRIDLib::exDropDownColumnWidth,"224¦¦¦96"); var_Editor->AddItem(1,L"Nancy Davolio¦Sales Representative¦Seattle¦(206) 555-9857",long(1)); var_Editor->AddItem(2,L"Andrew Fuller¦<b>Vice President</b>, Sales¦Tacoma¦(206) 555-9482",long(2)); var_Editor->InsertItem(3,L"Janet Leverling¦Sales Representative¦Kirkland¦(206) 555-3412",long(3),long(2)); var_Editor->InsertItem(4,L"Peacock Margaret¦Sales Representative¦Redmond¦(206) 555-8122",long(3),long(2)); var_Editor->InsertItem(5,L"Steven Buchanan¦Sales Manager¦London¦(71) 555-4848",long(2),long(2)); var_Editor->InsertItem(6,L"Michael Suyama¦Sales Representative¦London¦(71) 555-7773",long(1),long(5)); var_Editor->InsertItem(7,L"Robert King¦Sales Representative¦Kirkland¦(71) 555-5598",long(2),long(2)); var_Editor->InsertItem(8,L"Laura Callahan¦Inside Sales Coordinator¦Seattle¦(206) 555-1189",long(3),long(2)); var_Editor->InsertItem(9,L"Anne Dodsworth¦Sales Representative¦London¦(71) 555-4444",long(2),long(5)); var_Editor->ExpandAll(); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem(long(1)); var_Items->AddItem(long(2)); var_Items->AddItem(long(4)); spGrid1->EndUpdate(); |
1147 |
Does you control support multiple-columns for a drop down editor
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); EXGRIDLib::IEditorPtr var_Editor = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Multiple-Columns DropDownListType")))->GetEditor(); var_Editor->PutEditType(EXGRIDLib::DropDownListType); var_Editor->PutDropDownAutoWidth(EXGRIDLib::exDropDownEditorWidth); var_Editor->AddItem(0,L"Jollyville¦JV3¦3026N 09746W¦TX",vtMissing); var_Editor->AddItem(1,L"Altamont¦TMO¦4021N 11017W¦UT",vtMissing); var_Editor->AddItem(2,L"Williamston¦IIM¦4241N 08417W¦MI",vtMissing); var_Editor->AddItem(3,L"Merrittstown¦IWN¦3958N 07952W¦PA",vtMissing); var_Editor->AddItem(4,L"Houston¦HOU¦2945N 09521W¦TX",vtMissing); var_Editor->AddItem(5,L"Gales Ferry¦GSF¦4125N 07205W¦CT",vtMissing); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->InsertItem(0,"",long(1)); var_Items->InsertItem(0,"",long(2)); var_Items->InsertItem(0,"",long(4)); spGrid1->EndUpdate(); |
1146 |
Is it possible to show the filterbar on top of the rows
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarTop); spGrid1->PutHeaderHeight(24); spGrid1->PutFilterBarHeight(spGrid1->GetHeaderHeight()); spGrid1->PutHeaderAppearance(EXGRIDLib::Flat); spGrid1->PutDrawGridLines(EXGRIDLib::exAllLines); spGrid1->PutGridLineStyle(EXGRIDLib::exGridLinesGeometric); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXGRIDLib::exPattern); var_Column->PutFilter(L"B*"); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Index"))); var_Column1->PutFormatColumn(L"1 index ``"); var_Column1->PutPosition(0); var_Column1->PutWidth(48); var_Column1->PutAllowSizing(VARIANT_FALSE); var_Column1->PutSortType(EXGRIDLib::SortNumeric); var_Column1->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("A.1"); var_Items->AddItem("A.2"); var_Items->AddItem("B.1"); var_Items->AddItem("B.2"); var_Items->AddItem("B.3"); var_Items->AddItem("C"); spGrid1->ApplyFilter(); spGrid1->EndUpdate(); |
1145 |
DragDrop (with visual effect)
// OLEDragDrop event - Occurs when a source component is dropped onto a target component when the source component determines that a drop can occur. void OnOLEDragDropGrid1(LPDISPATCH Data,long FAR* Effect,short Button,short Shift,long X,long Y) { // SelectItem(InsertItem(i,, Data.GetData(1))) = True /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); long i = spGrid1->GetItemFromPoint(-1,-1,c,hit); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutExpandItem(i,VARIANT_TRUE); } // OLEStartDrag event - Occurs when the OLEDrag method is called. void OnOLEStartDragGrid1(LPDISPATCH Data,long FAR* AllowedEffects) { // Data.SetData(Me.Items.CellCaption(FocusItem, 0), 1) EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); AllowedEffects = 1; } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetVisualAppearance()->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABPUIQAAYAQGKIcBiAKBQAGaAoDgYN4MAANAwjJBMKgBBCLIxhEYobgmGIaRjEEQDCKYcxHCaIBiGcaIfDEBIeSBHcgRbAcOQHGSZZBhGRJG") + "juKIbSrLICzBDUcRnGwAKQoaaaEomHwyAZOYwDAIoWhpKKCKjqWJKNb+XgAAJTES0RRVRTNAZ1YghGAQgIA=="); spGrid1->PutBackground(EXGRIDLib::exListOLEDropPosition,0x1000000); spGrid1->PutBackground(EXGRIDLib::exDragDropBefore,RGB(0,0,0)); spGrid1->PutBackground(EXGRIDLib::exDragDropAfter,RGB(255,255,255)); spGrid1->PutOLEDropMode(EXGRIDLib::exOLEDropManual); spGrid1->PutAutoDrag(EXGRIDLib::exAutoDragPositionAnyOnRight); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); spGrid1->PutIndent(16); spGrid1->PutSelBackMode(EXGRIDLib::exTransparent); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); OutputDebugStringW( L"You can:" ); OutputDebugStringW( L"A) left-click to drag and drop items between controls (open a new exhelper and run the same sample)" ); OutputDebugStringW( L"B) right-click to re-arrange the item position inside the same control" ); OutputDebugStringW( L"This sample shows how you can insert the data being dropped as a child of the item being hovered." ); |
1144 |
DragDrop (with no visual effect, hide item while drag and drop)
// OLEDragDrop event - Occurs when a source component is dropped onto a target component when the source component determines that a drop can occur. void OnOLEDragDropGrid1(LPDISPATCH Data,long FAR* Effect,short Button,short Shift,long X,long Y) { // SelectItem(InsertItem(i,, Data.GetData(1))) = True /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); long i = spGrid1->GetItemFromPoint(-1,-1,c,hit); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutExpandItem(i,VARIANT_TRUE); } // OLEStartDrag event - Occurs when the OLEDrag method is called. void OnOLEStartDragGrid1(LPDISPATCH Data,long FAR* AllowedEffects) { // Data.SetData(Me.Items.CellCaption(FocusItem, 0), 1) EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); AllowedEffects = 1; } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->PutBackground(EXGRIDLib::exDragDropBefore,RGB(0,0,0)); spGrid1->PutBackground(EXGRIDLib::exDragDropAfter,RGB(255,255,255)); spGrid1->PutOLEDropMode(EXGRIDLib::exOLEDropManual); spGrid1->PutAutoDrag(EXGRIDLib::exAutoDragPositionAnyOnRight); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); spGrid1->PutIndent(16); spGrid1->PutSelBackMode(EXGRIDLib::exTransparent); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); OutputDebugStringW( L"You can:" ); OutputDebugStringW( L"A) left-click to drag and drop items between controls (open a new exhelper and run the same sample)" ); OutputDebugStringW( L"B) right-click to re-arrange the item position inside the same control" ); OutputDebugStringW( L"This sample shows how you can insert the data being dropped as a child of the item being hovered." ); |
1143 |
DragDrop
// OLEDragDrop event - Occurs when a source component is dropped onto a target component when the source component determines that a drop can occur. void OnOLEDragDropGrid1(LPDISPATCH Data,long FAR* Effect,short Button,short Shift,long X,long Y) { // SelectItem(InsertItem(i,, Data.GetData(1))) = True /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); long i = spGrid1->GetItemFromPoint(-1,-1,c,hit); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutExpandItem(i,VARIANT_TRUE); } // OLEStartDrag event - Occurs when the OLEDrag method is called. void OnOLEStartDragGrid1(LPDISPATCH Data,long FAR* AllowedEffects) { // Data.SetData(Me.Items.CellCaption(FocusItem, 0), 1) EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); AllowedEffects = 1; } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->PutOLEDropMode(EXGRIDLib::exOLEDropManual); spGrid1->PutAutoDrag(EXGRIDLib::exAutoDragPositionAnyOnRight); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); spGrid1->PutIndent(16); spGrid1->PutSelBackMode(EXGRIDLib::exTransparent); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); OutputDebugStringW( L"You can:" ); OutputDebugStringW( L"A) left-click to drag and drop items between controls (open a new exhelper and run the same sample)" ); OutputDebugStringW( L"B) right-click to re-arrange the item position inside the same control" ); OutputDebugStringW( L"This sample shows how you can insert the data being dropped as a child of the item being hovered." ); |
1142 |
Is there anyway to stop the header changing colour when the mouse hovers/moves across the column header (non-clickable)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); var_Columns->Add(L"Item"); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Pos"))); var_Column->PutPosition(0); var_Column->PutWidth(32); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutFormatColumn(L"1 index ``"); var_Column->PutAllowSort(VARIANT_FALSE); var_Column->PutAllowDragging(VARIANT_FALSE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item A"); var_Items->AddItem("Item B"); var_Items->AddItem("Item C"); spGrid1->EndUpdate(); |
1141 |
Is there anyway to stop the header changing colour when the mouse hovers/moves across the column header
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutBackground(EXGRIDLib::exCursorHoverColumn,-1); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); var_Columns->Add(L"Item"); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Pos"))); var_Column->PutPosition(0); var_Column->PutWidth(32); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutFormatColumn(L"1 index ``"); var_Column->PutAllowSort(VARIANT_FALSE); var_Column->PutAllowDragging(VARIANT_FALSE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item A"); var_Items->AddItem("Item B"); var_Items->AddItem("Item C"); spGrid1->EndUpdate(); |
1140 |
Is it possible to exclude the parent/child items when do the filtering, so to include only items that match the filter without any indentation
// FilterChange event - Occurs when filter was changed. void OnFilterChangeGrid1() { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->PutIndent(spGrid1->FormatABC(L"value > 0 ? 18 : 0",->GetItems()->GetMatchItemCount(),vtMissing,vtMissing)); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); spGrid1->PutIndent(18); spGrid1->PutFilterInclude(EXGRIDLib::exMatchingItemsOnly); spGrid1->PutDrawGridLines(EXGRIDLib::exVLines); spGrid1->PutHeaderAppearance(EXGRIDLib::Flat); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXGRIDLib::exFilter); var_Column->PutFilterList(EXGRIDLib::exShowCheckBox); var_Column->PutFilter(L"C1"); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Pos"))); var_Column1->PutFormatColumn(L"1 rindex ``"); var_Column1->PutPosition(0); var_Column1->PutAllowSizing(VARIANT_FALSE); var_Column1->PutAllowDragging(VARIANT_FALSE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("R1"); long h2 = var_Items->InsertItem(h,vtMissing,"S"); var_Items->InsertItem(h2,vtMissing,"C1"); var_Items->InsertItem(h2,vtMissing,"C2"); var_Items->InsertItem(h,vtMissing,"C1"); var_Items->InsertItem(h,vtMissing,"C2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("R2"); var_Items->InsertItem(h,vtMissing,"C1"); var_Items->InsertItem(h,vtMissing,"C2"); spGrid1->ApplyFilter(); spGrid1->EndUpdate(); |
1139 |
How can I display the total/sum/aggregate in the same column, when the user groups by a column
// AddColumn event - Fired after a new column has been added. void OnAddColumnGrid1(LPDISPATCH Column) { } // AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. void OnAddGroupItemGrid1(long Item) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutItemDivider(Item,-1); var_Items->PutItemBackColor(Item,spGrid1->GetBackColorSortBar()); var_Items->PutItemHeight(Item,spGrid1->GetHeaderHeight()); var_Items->PutCellMerge(Item,long(0),"1,2,3,4,5,7,8,9,10,11,12"); var_Items->PutCellValue(Item,long(13),"count(current,rec,1)"); var_Items->PutCellValueFormat(Item,long(13),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML)); var_Items->PutCellValue(Item,long(0),var_Items->GetCellCaption(Item,var_Items->GetGroupItem(Item))); var_Items->PutFormatCell(Item,long(0),L"`<b>` + value + `</b> <font ;7><off 3><fgcolor=808080>(` + %13 + `)`"); var_Items->PutCellValue(Item,long(6),"sum(current,all,dbl(%6))"); var_Items->PutCellValueFormat(Item,long(6),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML)); var_Items->PutCellForeColor(Item,long(6),RGB(102,102,102)); } // Change event - Occurs when the user changes the cell's content. void OnChangeGrid1(long Item,long ColIndex,VARIANT FAR* NewValue) { EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->Refresh(); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutLinesAtRoot(EXGRIDLib::exGroupLinesOutside); spGrid1->PutIndent(12); spGrid1->PutColumnAutoResize(VARIANT_FALSE); spGrid1->PutScrollBySingleLine(VARIANT_TRUE); spGrid1->PutBackColorSortBar(RGB(240,240,240)); spGrid1->PutAutoDrag(EXGRIDLib::exAutoDragScroll); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library' #import <msado15.dll> rename("EOF","REOF") */ ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset"); rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0); spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs))); spGrid1->PutSingleSort(VARIANT_FALSE); spGrid1->PutSortBarVisible(VARIANT_TRUE); spGrid1->PutAllowGroupBy(VARIANT_TRUE); spGrid1->PutHeaderHeight(24); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Count")))->PutVisible(VARIANT_FALSE); EXGRIDLib::IColumnPtr var_Column = var_Columns->GetItem("Freight"); var_Column->PutDef(EXGRIDLib::exCellBackColor,spGrid1->GetBackColorSortBar()); var_Column->PutDef(EXGRIDLib::exHeaderBackColor,var_Column->GetDef(EXGRIDLib::exCellBackColor)); var_Column->PutDef(EXGRIDLib::exCellPaddingRight,long(4)); var_Column->PutDef(EXGRIDLib::exCellPaddingLeft,long(4)); var_Column->PutHeaderBold(VARIANT_TRUE); var_Column->PutAllowGroupBy(VARIANT_FALSE); var_Column->PutFormatColumn(L"value format ``"); var_Column->PutAlignment(EXGRIDLib::RightAlignment); EXGRIDLib::IColumnPtr var_Column1 = var_Columns->GetItem(long(0)); var_Column1->PutAllowGroupBy(VARIANT_FALSE); var_Column1->PutDef(EXGRIDLib::exCellValueFormat,long(1)); var_Columns->GetItem("ShipCountry")->PutSortOrder(EXGRIDLib::SortAscending); spGrid1->PutScrollBySingleLine(VARIANT_FALSE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutLockedItemCount(EXGRIDLib::exBottom,1); long hL = var_Items->GetLockedItem(EXGRIDLib::exBottom,0); var_Items->PutItemHeight(hL,24); var_Items->PutItemBold(hL,VARIANT_TRUE); var_Items->PutItemBackColor(hL,spGrid1->GetBackColorSortBar()); var_Items->PutCellValue(hL,long(6),"sum(all,rec,dbl(%6))"); var_Items->PutCellValueFormat(hL,long(6),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML)); var_Items->PutCellHAlignment(hL,long(6),EXGRIDLib::RightAlignment); var_Items->PutFormatCell(hL,long(6),L"value format ``"); spGrid1->EndUpdate(); |
1138 |
I would like to display a solid line between "root" items, and dotted lines (default) between child items. How can I do that
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); spGrid1->PutDrawGridLines(EXGRIDLib::exHLines); spGrid1->PutGridLineStyle(EXGRIDLib::exGridLinesGeometric); spGrid1->GetVisualAppearance()->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABMsIQAAYAQGKIcBiAKBQAGaAoDgYN4MAANAwjJBMKgBBCLIxhEYobgmGIXRpFMbxAKQahLEiTIgGUYJHgmK4tQLHb7zGAABRDDSOIDnGQJX") + "haI4JQSMMQDGLAZxVFiPRhAWLpBh+PQATrOdLUfSjVwhBKAQEBA=="); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Default"))); var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutPartialCheck(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Position"))); var_Column1->PutFormatColumn(L"((1 rindex ``) contains `.`) = 0"); var_Column1->PutVisible(VARIANT_FALSE); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = spGrid1->GetConditionalFormats()->Add(L"%C1",vtMissing); var_ConditionalFormat->PutBackColor(0x1e0e0e0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->InsertItem(h,vtMissing,"Child 3"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); h = var_Items->AddItem("Root 3"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); spGrid1->EndUpdate(); |
1137 |
I can not center or align the cell's caption and icon, when it displays the hierarchy
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") + "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" + "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Tasks"))); var_Column->PutDef(EXGRIDLib::exCellValueFormat,long(1)); spGrid1->PutHeaderVisible(VARIANT_TRUE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Project"); long hChild = var_Items->InsertItem(h,vtMissing,"<img>1</img> Task (left)"); hChild = var_Items->InsertItem(h,vtMissing,"<c><img>2</img> Task (center)"); hChild = var_Items->InsertItem(h,vtMissing,"<r>Task (right) <img>3</img>"); var_Items->PutExpandItem(h,VARIANT_TRUE); spGrid1->EndUpdate(); |
1136 |
How do I mask for float/integer number
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutColumnAutoResize(VARIANT_TRUE); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Type")))->PutWidth(32); spGrid1->GetColumns()->Add(L"Editor"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Integer"); var_Items->PutCellValue(h,long(1),"12"); EXGRIDLib::IEditorPtr var_Editor = var_Items->GetCellEditor(h,long(1)); var_Editor->PutEditType(EXGRIDLib::EditType); var_Editor->PutNumeric(EXGRIDLib::exInteger); h = var_Items->AddItem("Integer (mask, group)"); var_Items->PutCellValue(h,long(1),"10002"); var_Items->PutFormatCell(h,long(1),L"value format `0||`"); EXGRIDLib::IEditorPtr var_Editor1 = var_Items->GetCellEditor(h,long(1)); var_Editor1->PutEditType(EXGRIDLib::MaskType); var_Editor1->PutMask(L";;;float,digits=0,invalid=empty,warning=invalid character"); h = var_Items->AddItem("Integer (mask, no group)"); var_Items->PutCellValue(h,long(1),"10002"); var_Items->PutFormatCell(h,long(1),L"value format `0|0|`"); EXGRIDLib::IEditorPtr var_Editor2 = var_Items->GetCellEditor(h,long(1)); var_Editor2->PutEditType(EXGRIDLib::MaskType); var_Editor2->PutMask(L";;;float,digits=0,grouping=,invalid=empty,warning=invalid character"); h = var_Items->AddItem("Float"); var_Items->PutCellValue(h,long(1),"+12.34E+2"); EXGRIDLib::IEditorPtr var_Editor3 = var_Items->GetCellEditor(h,long(1)); var_Editor3->PutEditType(EXGRIDLib::EditType); var_Editor3->PutNumeric(EXGRIDLib::exFloat); h = var_Items->AddItem("Float (no signs)"); var_Items->PutCellValue(h,long(1),"12.34E-2"); EXGRIDLib::IEditorPtr var_Editor4 = var_Items->GetCellEditor(h,long(1)); var_Editor4->PutEditType(EXGRIDLib::EditType); var_Editor4->PutNumeric(EXGRIDLib::NumericEnum(EXGRIDLib::exDisableSigns | EXGRIDLib::exFloat)); h = var_Items->AddItem("Float-Integer"); var_Items->PutCellValue(h,long(1),"+12.34"); EXGRIDLib::IEditorPtr var_Editor5 = var_Items->GetCellEditor(h,long(1)); var_Editor5->PutEditType(EXGRIDLib::EditType); var_Editor5->PutNumeric(EXGRIDLib::exFloatInteger); h = var_Items->AddItem("Float-Integer (no signs)"); var_Items->PutCellValue(h,long(1),"12.34"); EXGRIDLib::IEditorPtr var_Editor6 = var_Items->GetCellEditor(h,long(1)); var_Editor6->PutEditType(EXGRIDLib::EditType); var_Editor6->PutNumeric(EXGRIDLib::NumericEnum(EXGRIDLib::exDisableSigns | EXGRIDLib::exFloatInteger)); h = var_Items->AddItem("Float (mask,group)"); var_Items->PutCellValue(h,long(1),"10002.34"); var_Items->PutFormatCell(h,long(1),L"value format `2`"); EXGRIDLib::IEditorPtr var_Editor7 = var_Items->GetCellEditor(h,long(1)); var_Editor7->PutEditType(EXGRIDLib::MaskType); var_Editor7->PutMask(L";;;float,invalid=empty,warning=invalid character"); h = var_Items->AddItem("Float (mask, no group)"); var_Items->PutCellValue(h,long(1),"10002.34"); var_Items->PutFormatCell(h,long(1),L"value format `2|0|`"); EXGRIDLib::IEditorPtr var_Editor8 = var_Items->GetCellEditor(h,long(1)); var_Editor8->PutEditType(EXGRIDLib::MaskType); var_Editor8->PutMask(L";;;float,grouping=,invalid=empty,warning=invalid character"); spGrid1->EndUpdate(); |
1135 |
How do I set an extra data for each item
// MouseMove event - Occurs when the user moves the mouse. void OnMouseMoveGrid1(short Button,short Shift,long X,long Y) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); long i = spGrid1->GetItemFromPoint(-1,-1,c,hit); OutputDebugStringW( L"i" ); OutputDebugStringW( _bstr_t(spGrid1->GetItems()->GetItemData(i)) ); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutColumnAutoResize(VARIANT_TRUE); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutItemData(var_Items->AddItem("method 1"),"your extra data of method 1"); var_Items->InsertItem(0,"your extra data of method 2","method 2"); EXGRIDLib::IItemsPtr var_Items1 = spGrid1->GetItems(); var_Items1->PutDefaultItem(var_Items1->AddItem("method 3")); var_Items1->PutItemData(0,"your extra data of method 3"); spGrid1->EndUpdate(); |
1134 |
I do not like to specify the item padding for every column I add. The question is how can I do it automatically
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->AttachTemplate("handle AddColumn(Column){Column{Def(48)=8;Def(49)=8;AllowDragging=False;AllowSizing = True}}"); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutDrawGridLines(EXGRIDLib::exAllLines); spGrid1->PutGridLineStyle(EXGRIDLib::exGridLinesVSolid); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); var_Columns->Add(L"Item"); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Pos"))); var_Column->PutPosition(0); var_Column->PutWidth(32); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutFormatColumn(L"1 index ``"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item A"); var_Items->AddItem("Item B"); var_Items->AddItem("Item C"); spGrid1->EndUpdate(); |
1133 |
How can I change the Exclude field in the drop down filter window
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); spGrid1->PutHTMLPicture(L"exclude",_bstr_t("gCJKBOI4NBQaBQAhQNJJIIhShQACERCAEAcRdrdcUQhQDOZCJJUBEjbbhJ7giIJOBILJziJvl4BeKibhDiIZOhFLB0KZvMx0O5hORlAB3owuNJuNZzMZhOBlFxvORnT") + "buHgaiIeKBMKhFf9fDIcEoPCAVEAlGI4HhBBYMCARCQVGg4IhVMCAWC2XY1Q7WJ8RBB0KROKYAYDBbzicjndD6fA/VsRHRJIhBkRbMYIGwGAQjA2fRYOEBoYjBFBx1AT" + "CgCGQ8M7OTjSaJMDRDKIwYu5DrIMBgSAADKJTqhBhyRApAA3FAucZPPilokRJJFJxEVxCMCCgIA=="); spGrid1->PutDescription(EXGRIDLib::exFilterBarExclude,L"<img>exclude</img>"); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Items"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutDisplayFilterPattern(VARIANT_FALSE); var_Column->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox)); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,vtMissing,"Child 1"); spGrid1->EndUpdate(); |
1132 |
How can I change the Exclude field in the drop down filter window
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); spGrid1->PutDescription(EXGRIDLib::exFilterBarExclude,L"<bgcolor 0><fgcolor ffffff> Exclude </fgcolor></bgcolor>"); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Items"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutDisplayFilterPattern(VARIANT_FALSE); var_Column->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox)); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,vtMissing,"Child 1"); spGrid1->EndUpdate(); |
1131 |
The grid lines looks different then before. What should I do
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); spGrid1->PutDrawGridLines(EXGRIDLib::exAllLines); spGrid1->PutGridLineStyle(EXGRIDLib::exGridLinesGeometric); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Tasks"))); var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutPartialCheck(VARIANT_TRUE); spGrid1->PutHeaderVisible(VARIANT_TRUE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Project"); long hChild = var_Items->InsertItem(h,vtMissing,"Task 1"); var_Items->PutSelectItem(hChild,VARIANT_TRUE); hChild = var_Items->InsertItem(h,vtMissing,"Task 2"); var_Items->PutCellState(hChild,long(0),1); hChild = var_Items->InsertItem(h,vtMissing,"Task 3"); var_Items->PutCellState(hChild,long(0),1); var_Items->PutExpandItem(h,VARIANT_TRUE); spGrid1->EndUpdate(); |
1130 |
Can I sort the column by check-state
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Check"))); var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutSortType(EXGRIDLib::exSortByState); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem(vtMissing); var_Items->PutCellState(var_Items->AddItem(vtMissing),long(0),1); var_Items->PutCellState(var_Items->AddItem(vtMissing),long(0),1); var_Items->AddItem(vtMissing); spGrid1->GetColumns()->GetItem(long(0))->PutSortOrder(EXGRIDLib::SortAscending); spGrid1->EndUpdate(); |
1129 |
Can I sort the column by image
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") + "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" + "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Image"))); var_Column->PutSortType(EXGRIDLib::exSortByImage); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellImage(var_Items->AddItem(vtMissing),long(0),3); var_Items->AddItem(vtMissing); var_Items->PutCellImage(var_Items->AddItem(vtMissing),long(0),1); var_Items->PutCellImage(var_Items->AddItem(vtMissing),long(0),2); spGrid1->GetColumns()->GetItem(long(0))->PutSortOrder(EXGRIDLib::SortAscending); spGrid1->EndUpdate(); |
1128 |
Can I sort the column by value(numeric)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Value"))); var_Column->PutDef(EXGRIDLib::exCellValueFormat,long(1)); var_Column->PutFormatColumn(L"`<fgcolor=808080><off 4><font ;6> ` + (1 index ``) + ` </font></off></fgcolor>` + value"); var_Column->PutSortType(EXGRIDLib::SortTypeEnum(EXGRIDLib::exSortByValue | EXGRIDLib::SortNumeric)); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("1"); var_Items->AddItem("10"); var_Items->AddItem("2"); var_Items->AddItem("20"); spGrid1->GetColumns()->GetItem(long(0))->PutSortOrder(EXGRIDLib::SortAscending); spGrid1->EndUpdate(); |
1127 |
Can I sort a column by cell's state (checked, unchecked) rather than caption
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Check"))); EXGRIDLib::IEditorPtr var_Editor = var_Column->GetEditor(); var_Editor->PutEditType(EXGRIDLib::CheckValueType); var_Editor->PutOption(EXGRIDLib::exCheckValue2,long(1)); var_Column->PutSortType(EXGRIDLib::SortNumeric); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem(VARIANT_TRUE); var_Items->AddItem(VARIANT_FALSE); var_Items->AddItem(VARIANT_FALSE); var_Items->AddItem(VARIANT_TRUE); spGrid1->GetColumns()->GetItem(long(0))->PutSortOrder(EXGRIDLib::SortAscending); spGrid1->EndUpdate(); |
1126 |
How do I get the item's auto-number, when using FormatColumn property, as CellValue gets empty
// SelectionChanged event - Fired after a new item has been selected. void OnSelectionChangedGrid1() { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); OutputDebugStringW( L"pos: " ); OutputDebugStringW( var_Items->GetCellCaption(var_Items->GetFocusItem(),long(1)) ); OutputDebugStringW( L"rpos(1): " ); OutputDebugStringW( var_Items->GetCellCaption(var_Items->GetFocusItem(),long(2)) ); OutputDebugStringW( L"rpos(2): " ); OutputDebugStringW( var_Items->GetCellCaption(var_Items->GetFocusItem(),long(3)) ); OutputDebugStringW( L"apos: " ); OutputDebugStringW( var_Items->GetCellCaption(var_Items->GetFocusItem(),long(4)) ); OutputDebugStringW( L"index: " ); OutputDebugStringW( var_Items->GetCellCaption(var_Items->GetFocusItem(),long(5)) ); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); spGrid1->PutDrawGridLines(EXGRIDLib::exRowLines); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); var_Columns->Add(L"Items"); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"pos"))); var_Column->PutFormatColumn(L"1 pos ``"); var_Column->PutPosition(0); var_Column->PutWidth(48); var_Column->PutAllowSizing(VARIANT_FALSE); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"rpos(1)"))); var_Column1->PutFormatColumn(L"1 rpos ``"); var_Column1->PutPosition(1); var_Column1->PutWidth(48); var_Column1->PutAllowSizing(VARIANT_FALSE); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"rpos(2)"))); var_Column2->PutFormatColumn(L"1 rpos `.||A-Z`"); var_Column2->PutPosition(2); var_Column2->PutWidth(48); var_Column2->PutAllowSizing(VARIANT_FALSE); EXGRIDLib::IColumnPtr var_Column3 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"apos"))); var_Column3->PutFormatColumn(L"1 apos ``"); var_Column3->PutPosition(3); var_Column3->PutWidth(48); var_Column3->PutAllowSizing(VARIANT_FALSE); EXGRIDLib::IColumnPtr var_Column4 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"index"))); var_Column4->PutFormatColumn(L"1 index ``"); var_Column4->PutPosition(4); var_Column4->PutWidth(48); var_Column4->PutAllowSizing(VARIANT_FALSE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Item 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); long hSel = var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->AddItem("Item 2"); var_Items->AddItem("Item 3"); spGrid1->EndUpdate(); spGrid1->GetItems()->PutSelectItem(hSel,VARIANT_TRUE); |
1125 |
How can I display UNICODE characters
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); /* Copy and paste the following directives to your header file as it defines the namespace 'stdole' for the library: 'OLE Automation' #import <stdole2.tlb> */ stdole::FontPtr var_StdFont = spGrid1->GetFont(); var_StdFont->PutName(L"Arial Unicode"); var_StdFont->PutSize(_variant_t(long(22))); spGrid1->PutHeaderVisible(VARIANT_FALSE); spGrid1->PutDefaultItemHeight(48); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"")))->PutDef(EXGRIDLib::exCellValueFormat,long(1)); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Ӓӓ"); var_Items->AddItem("ᦜᦝ;ᦞ"); var_Items->AddItem("ɮɭ;ɯ"); var_Items->AddItem("勳勴勵勶"); var_Items->PutFormatCell(var_Items->AddItem(spGrid1->GetVersion()),long(0),L"(value lfind `UNICODE`) < 0 ? `<fgcolor=FF0000><b>!UNICODE!</b> version</fgcolor> required: ` + value : `` "); spGrid1->EndUpdate(); |
1124 |
How do I display the position of the item with 0-padding
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Items")))->PutFormatColumn(L"((1 apos ``) lpad `00`) + `. ` + value"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item A"); var_Items->AddItem("Item B"); var_Items->AddItem("Item C"); var_Items->AddItem("Item D"); spGrid1->EndUpdate(); |
1123 |
Can't get the +/- to be displayed on a divider item. What else can I do
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); spGrid1->PutDrawGridLines(EXGRIDLib::exAllLines); spGrid1->PutTreeColumnIndex(0); spGrid1->PutMarkSearchColumn(VARIANT_FALSE); spGrid1->PutFullRowSelect(EXGRIDLib::exColumnSel); spGrid1->PutHeaderAppearance(EXGRIDLib::AppearanceEnum(0xfffffff8 | EXGRIDLib::Bump | EXGRIDLib::Sunken)); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"C1")))->PutWidth(32); ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"C2")))->PutFormatColumn(L"1 index ``"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellSingleLine(h,long(1),EXGRIDLib::exCaptionWordWrap); h = var_Items->AddItem("This is bit of text merges all cells in the item (divider shows no +/-)"); var_Items->PutItemDivider(h,0); var_Items->PutItemBackColor(h,RGB(240,240,240)); var_Items->PutItemDividerLine(h,EXGRIDLib::EmptyLine); var_Items->PutCellHAlignment(h,long(0),EXGRIDLib::CenterAlignment); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Cell 3"); h = var_Items->AddItem("This is bit of text merges all cells in the item (merge shows +/-)"); var_Items->PutItemBackColor(h,RGB(240,240,240)); var_Items->PutCellMerge(h,long(0),long(1)); var_Items->InsertItem(h,vtMissing,"Child 3"); var_Items->InsertItem(h,vtMissing,"Child 4"); var_Items->PutExpandItem(h,VARIANT_TRUE); spGrid1->EndUpdate(); |
1122 |
How can I define a column of button type
// ButtonClick event - Occurs when user clicks on the cell's button. void OnButtonClickGrid1(long Item,long ColIndex,VARIANT Key) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); OutputDebugStringW( _bstr_t(var_Items->GetCellValue(Item,ColIndex)) ); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Button"))); var_Column->PutDef(EXGRIDLib::exCellHasButton,VARIANT_TRUE); var_Column->PutDef(EXGRIDLib::exCellButtonAutoWidth,VARIANT_FALSE); var_Column->PutFormatColumn(L"``"); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutWidth(48); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Second")))->PutFormatColumn(L"` Item ` + 1 index ``"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Button 1"); var_Items->AddItem("Button 2"); var_Items->AddItem("Button 3 "); spGrid1->EndUpdate(); |
1121 |
Is it possible to configure different colour/icon when there is a active filter
// FilterChange event - Occurs when filter was changed. void OnFilterChangeGrid1() { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->PutBackground(EXGRIDLib::exHeaderFilterBarButton,spGrid1->FormatABC(L"value = 0 ? 0x1000001 : 0x10000FF ",spGrid1->GetColumns()->GetItem(long(0))->GetFilterType(),vtMissing,vtMissing)); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IAppearancePtr var_Appearance = spGrid1->GetVisualAppearance(); var_Appearance->PutRenderType(-16777216); var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABXUIQAAYAQGKIcBiAKBQAGYBIJDEMgzDDAUBjKKocQTC4AIQjCK4JDKHYJRpHEZyCA8EhqGASRAFUQBYiWE4oSpLABQaK0ZwIGyRIrkGQgQ") + "gmPYDSDNU4zVIEEglBI0TDNczhNDENgtGYaJqHIYpZBcM40TKkEZoSIITZcRrOEBiRL1S0RBhGcRUHZlWzdN64LhuK47UrWdD/XhdVzXRbjfz1Oq+bxve48Br7A5yYTh" + "dr4LhOFQ3RjIL4xbIcUwGe6VZhjOLZXjmO49T69HTtOCYBEBA"); spGrid1->PutDrawGridLines(EXGRIDLib::exAllLines); spGrid1->PutShowFocusRect(VARIANT_FALSE); spGrid1->PutBackground(EXGRIDLib::exHeaderFilterBarButton,0x1000001); spGrid1->PutBackground(EXGRIDLib::exCursorHoverColumn,-1); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutBackColorHeader(RGB(255,255,255)); spGrid1->PutHeaderVisible(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Filter"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutAllowSort(VARIANT_FALSE); var_Column->PutAllowDragging(VARIANT_FALSE); var_Column->PutFilterList(EXGRIDLib::exShowCheckBox); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item A"); var_Items->AddItem("Item B"); var_Items->AddItem("Item C"); EXGRIDLib::IColumnPtr var_Column1 = spGrid1->GetColumns()->GetItem(long(0)); var_Column1->PutFilter(L"Item B"); var_Column1->PutFilterType(EXGRIDLib::exFilter); spGrid1->ApplyFilter(); spGrid1->EndUpdate(); |
1120 |
How can I display the type of the value the column display
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutDrawGridLines(EXGRIDLib::exRowLines); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Values"))); var_Column->PutDef(EXGRIDLib::exCellValueFormat,long(1)); var_Column->PutFormatColumn(L"value + ` <off 4><fgcolor=808080>type(` + type(%0) + `)`"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem(vtMissing); var_Items->AddItem(long(-1)); var_Items->AddItem("string"); var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Items->AddItem(long(2)); var_Items->AddItem(VARIANT_TRUE); var_Items->AddItem(double(12.34)); spGrid1->EndUpdate(); |
1119 |
I want to create a conditional format for a column, verifying that the value of the cell is numeric, how can I do
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutDrawGridLines(EXGRIDLib::exRowLines); spGrid1->GetColumns()->Add(L"Values"); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = spGrid1->GetConditionalFormats()->Add(L"type(%0) in (2,3,4,5,18,19,20,21)",vtMissing); var_ConditionalFormat->PutForeColor(RGB(255,0,0)); var_ConditionalFormat->PutBold(VARIANT_TRUE); spGrid1->GetConditionalFormats()->Add(L"type(%0) = 11",vtMissing)->PutForeColor(RGB(0,255,0)); spGrid1->GetConditionalFormats()->Add(L"type(%0) = 7",vtMissing)->PutForeColor(RGB(0,0,255)); spGrid1->GetConditionalFormats()->Add(L"type(%0) in (0,1)",vtMissing)->PutBackColor(RGB(240,240,240)); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem(vtMissing); var_Items->AddItem(long(-1)); var_Items->AddItem("string"); var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Items->AddItem(long(2)); var_Items->AddItem(VARIANT_TRUE); var_Items->AddItem(double(12.34)); spGrid1->EndUpdate(); |
1118 |
How can I assign a computed value on a different column based on other columns
// Change event - Occurs when the user changes the cell's content. void OnChangeGrid1(long Item,long ColIndex,VARIANT FAR* NewValue) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->FreezeEvents(VARIANT_TRUE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(Item,long(1),spGrid1->FormatABC(L"int(255*sin(value/2))",NewValue,vtMissing,vtMissing)); var_Items->PutCellValue(Item,long(2),spGrid1->FormatABC(L"int(255*cos(value/2))",NewValue,vtMissing,vtMissing)); spGrid1->FreezeEvents(VARIANT_FALSE); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutSelBackMode(EXGRIDLib::exTransparent); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutDrawGridLines(EXGRIDLib::exRowLines); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Value"))); var_Column->GetEditor()->PutEditType(EXGRIDLib::SpinType); var_Column->PutWidth(64); var_Column->PutAllowSizing(VARIANT_FALSE); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Assign A")))->PutDef(EXGRIDLib::exCellBackColor,long(16448250)); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Assign B")))->PutDef(EXGRIDLib::exCellBackColor,long(16448250)); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Computed"))); var_Column->PutDef(EXGRIDLib::exCellBackColor,long(16448250)); var_Column->PutComputedField(L"%1 + %2"); var_Column->PutFormatColumn(L"value format ``"); var_Column->PutAlignment(EXGRIDLib::RightAlignment); var_Column->PutHeaderAlignment(var_Column->GetAlignment()); spGrid1->GetConditionalFormats()->Add(L"%3 >= 0",vtMissing)->PutBold(VARIANT_TRUE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem(long(1989)); var_Items->AddItem(long(2001)); var_Items->AddItem(long(2017)); var_Items->AddItem(long(2018)); var_Items->AddItem(long(2019)); spGrid1->EndUpdate(); |
1117 |
How can I get computed a value on a different column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutDrawGridLines(EXGRIDLib::exRowLines); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Year"))); var_Column->GetEditor()->PutEditType(EXGRIDLib::SpinType); var_Column->PutWidth(64); var_Column->PutAllowSizing(VARIANT_FALSE); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Easter")))->PutFormatColumn(_bstr_t("date(dateS('3/1/' + %0) + ((1:=(((255 - 11 * (%0 mod 19)) - 21) mod 30) + 21) + (=:1 > 48 ? -1 : 0) + 6 - ((%0 + int(%0 / 4)) ") + "+ =:1 + (=:1 > 48 ? -1 : 0) + 1) mod 7))"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem(long(1989)); var_Items->AddItem(long(2001)); var_Items->AddItem(long(2017)); var_Items->AddItem(long(2018)); var_Items->AddItem(long(2019)); spGrid1->EndUpdate(); |
1116 |
How can I prevent applying ConditionalFormats on a specified cell, for instance I am displaying a Total field, and I will like to have formatted in a different way (method 2)
// Change event - Occurs when the user changes the cell's content. void OnChangeGrid1(long Item,long ColIndex,VARIANT FAR* NewValue) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->Refresh(); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = spGrid1->GetConditionalFormats()->Add(L"(%0 >= 0)",vtMissing); var_ConditionalFormat->PutExpression(L"(0=type(%CD0)) and (%0 >= 0)"); var_ConditionalFormat->PutBold(VARIANT_TRUE); var_ConditionalFormat->PutForeColor(RGB(255,0,0)); OutputDebugStringW( L"ConditionalFormat.Valid" ); OutputDebugStringW( _bstr_t(var_ConditionalFormat->GetValid()) ); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Numbers"))); EXGRIDLib::IEditorPtr var_Editor = var_Column->GetEditor(); var_Editor->PutNumeric(EXGRIDLib::exInteger); var_Editor->PutEditType(EXGRIDLib::SpinType); var_Column->PutSortType(EXGRIDLib::SortNumeric); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem(long(100)); var_Items->AddItem(long(-25)); var_Items->AddItem(long(31)); var_Items->AddItem(long(-48)); EXGRIDLib::IItemsPtr var_Items1 = spGrid1->GetItems(); long h = var_Items1->AddItem("sum(all,dir,dbl(%0))"); var_Items1->PutSelectableItem(h,VARIANT_FALSE); var_Items1->PutSortableItem(h,VARIANT_FALSE); var_Items1->PutItemBackColor(h,RGB(240,240,240)); var_Items1->PutCellData(h,long(0),"total"); var_Items1->PutCellValueFormat(h,long(0),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML)); var_Items1->PutFormatCell(h,long(0),L"'Total: <b><fgcolor=0000FF>'+(value format ``)"); spGrid1->EndUpdate(); |
1115 |
How can I prevent applying ConditionalFormats on a specified cell, for instance I am displaying a Total field, and I will like to have formatted in a different way (method 1)
// Change event - Occurs when the user changes the cell's content. void OnChangeGrid1(long Item,long ColIndex,VARIANT FAR* NewValue) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->Refresh(); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = spGrid1->GetConditionalFormats()->Add(L"%0 >= 0",vtMissing); var_ConditionalFormat->PutBold(VARIANT_TRUE); var_ConditionalFormat->PutForeColor(RGB(255,0,0)); var_ConditionalFormat->PutApplyTo(EXGRIDLib::exFormatToColumns); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Numbers"))); EXGRIDLib::IEditorPtr var_Editor = var_Column->GetEditor(); var_Editor->PutNumeric(EXGRIDLib::exInteger); var_Editor->PutEditType(EXGRIDLib::SpinType); var_Column->PutSortType(EXGRIDLib::SortNumeric); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Total")))->PutVisible(VARIANT_FALSE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutLockedItemCount(EXGRIDLib::exBottom,1); long h = var_Items->GetLockedItem(EXGRIDLib::exBottom,0); var_Items->PutItemDivider(h,1); var_Items->PutItemDividerLine(h,EXGRIDLib::EmptyLine); var_Items->PutItemBackColor(h,RGB(240,240,240)); var_Items->PutCellValue(h,long(1),"sum(all,dir,dbl(%0))"); var_Items->PutCellValueFormat(h,long(1),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML)); var_Items->PutCellHAlignment(h,long(1),EXGRIDLib::RightAlignment); var_Items->PutFormatCell(h,long(1),L"'Total: <b><fgcolor=0000FF>'+(value format ``)"); EXGRIDLib::IItemsPtr var_Items1 = spGrid1->GetItems(); var_Items1->AddItem(long(100)); var_Items1->AddItem(long(-25)); var_Items1->AddItem(long(31)); var_Items1->AddItem(long(-48)); spGrid1->EndUpdate(); |
1114 |
ADODB Requery sample
// ButtonClick event - Occurs when user clicks on the cell's button. void OnButtonClickGrid1(long Item,long ColIndex,VARIANT Key) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library' #import <msado15.dll> rename("EOF","REOF") */ ADODB::_CommandPtr cmd = ::CreateObject(L"ADODB.Command"); cmd->PutActiveConnection(((ADODB::_ConnectionPtr)(((ADODB::_RecordsetPtr)(spGrid1->GetDataSource()))->GetActiveConnection()))); cmd->PutCommandText(L"INSERT INTO Orders (EmployeeID) VALUES(12345)"); cmd->PutCommandType(ADODB::adCmdText); cmd->Execute(vtMissing,vtMissing,0); ((ADODB::_RecordsetPtr)(spGrid1->GetDataSource()))->Requery(0); } // Error event - Fired when an internal error occurs. void OnErrorGrid1(long Error,LPCTSTR Description) { EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); OutputDebugStringW( L"Description" ); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutColumnAutoResize(VARIANT_FALSE); ADODB::_RecordsetPtr rs = ::CreateObject(L"ADODB.Recordset"); rs->Open("Select * From Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenKeyset,ADODB::adLockOptimistic,0); spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs))); spGrid1->GetConditionalFormats()->Add(L"%1=12345",vtMissing)->PutBackColor(RGB(240,240,240)); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutLockedItemCount(EXGRIDLib::exTop,1); long h = var_Items->GetLockedItem(EXGRIDLib::exTop,0); var_Items->PutItemDivider(h,0); var_Items->PutCellHasButton(h,long(0),VARIANT_TRUE); var_Items->PutCellValue(h,long(0),"Requery (add a new record, using ADODB.Command)"); var_Items->PutCellHAlignment(h,long(0),EXGRIDLib::CenterAlignment); spGrid1->EndUpdate(); |
1113 |
I am using DetectAddNew property, but no new items is added when AddNew is performed
// ButtonClick event - Occurs when user clicks on the cell's button. void OnButtonClickGrid1(long Item,long ColIndex,VARIANT Key) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); /* Copy and paste the following directives to your header file as it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library' #import <msado15.dll> rename("EOF","REOF") */ ADODB::_RecordsetPtr var_Recordset = ((ADODB::_RecordsetPtr)(spGrid1->GetDataSource())); var_Recordset->AddNew("EmployeeID",long(123)); var_Recordset->Update(vtMissing,vtMissing); } // Error event - Fired when an internal error occurs. void OnErrorGrid1(long Error,LPCTSTR Description) { EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); OutputDebugStringW( L"Description" ); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutColumnAutoResize(VARIANT_FALSE); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ ADODB::_RecordsetPtr rs = ::CreateObject(L"ADODB.Recordset"); rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenKeyset,ADODB::adLockOptimistic,0); spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs))); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutLockedItemCount(EXGRIDLib::exTop,1); long h = var_Items->GetLockedItem(EXGRIDLib::exTop,0); var_Items->PutItemDivider(h,0); var_Items->PutCellHasButton(h,long(0),VARIANT_TRUE); var_Items->PutCellValue(h,long(0),"AddNew"); var_Items->PutCellHAlignment(h,long(0),EXGRIDLib::CenterAlignment); spGrid1->PutDetectAddNew(VARIANT_TRUE); spGrid1->PutDetectDelete(VARIANT_TRUE); spGrid1->EndUpdate(); |
1112 |
I am skinning the control's header-bar, but the background of the header-bar is shown on each item in the filter-bar drop down panel. What can I do
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IAppearancePtr var_Appearance = spGrid1->GetVisualAppearance(); var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABFgDg6AADACAxRDgMQBQKAAzQFAYcBqGqGAAGQZxYgmFgAQhFcZQSKUOQTDKMIziYBYfgkMIgSbJUgDGAkRRdDSOYDmGQYDiCIoRShOMIjH") + "LUXxtDaIZwhEAoJb+RgAUY/cTzaAEUwHHiTKInaCQGhsCYJUJAdRURQ9EwvCIZBpEWwLChENQwWLCNj2TScBwjC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BMARViHH" + "4HQOYmxuCpF2MsecEQVBvGQCcIQvA6i2CAAIARAQ="); var_Appearance->Add(2,_bstr_t("gBFLBCJwBAEHhEJAAEhABZEGACAADACAxRDgMQBQKAAzQFAYcBqGqGAAGQZxYgmFgAQhFcZQSKUOQTDKMIziYBYJhEMwwDhEIwjHCEEhsGIbJAGQBJCjWGodQLOEgzN") + "C0IxNFCQILhEZJADKII8TTOU5UPRESwTE4cKBmKhQCo2NpKR7VUTxCKQahLLivoCjBT8EzHMqtIzrCA6MpaP4pQjKcqwHJ8YyHEi0ZrjazKaj6T5AXDUcaWbbNVx3PK3" + "aioOpLZrqOZZYzYFoABTuJzPMSyIhxXD8cweaZvSpLExVYK9BY3PbKMgxC77QgTIpDaQMNS6PjtF43PAALLFUaNYzoOKzABMHATBIXAYJCwIIR5G7ID4BbQcCQAHL9DB" + "aEEIAEEISgGhMGZQmocgymmIRQkIEQ2BcGgbEIRQci8XaMBqTRVgSAZHG+S5pnOep+D6f4vjec5zn0fpfmgBgAH6TRoBYBoAh+eAmAiAgPFgNArgOQpIESdoEmCOAOAq" + "BYfFGAgaEaBgYHYFYFmIB5UiGCJUgKCgmgeYoHk4BgCmKRQiCwApgHgYgyH8B54lQU4NkMeJlBoDgjkiXBTg0R54iYIR+koeQVBoKpkgkChKhEJBkF4SFEjkDgJhFQoe" + "EmDJlBeehUhWJQJGIXoICWOQ6FeFIlhkfhlDsSJpiQVoamaSY2G6G5nAmRhpCOH5pkwVYdmeCZmHqHpnkmdhzhmaAIFiax8AABAEICA=="); spGrid1->PutBackColorHeader(0x1000000); spGrid1->PutForeColorHeader(RGB(128,128,128)); spGrid1->PutBackground(EXGRIDLib::exHeaderFilterBarButton,0x2000000); spGrid1->PutBackground(EXGRIDLib::exBackColorFilter,RGB(255,255,255)); spGrid1->PutBackground(EXGRIDLib::exForeColorFilter,RGB(0,0,1)); spGrid1->PutBackground(EXGRIDLib::exSelBackColorFilter,0x1ff8000); spGrid1->PutBackground(EXGRIDLib::exSelForeColorFilter,RGB(240,240,240)); spGrid1->PutBackground(EXGRIDLib::exCursorHoverColumn,-1); spGrid1->PutHeaderHeight(24); spGrid1->PutBackColorLevelHeader(spGrid1->GetBackColor()); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Filter"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutDisplayFilterPattern(VARIANT_FALSE); var_Column->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox | EXGRIDLib::exSortItemsAsc)); var_Column->PutDef(EXGRIDLib::exHeaderPaddingLeft,long(2)); var_Column->PutDef(EXGRIDLib::exHeaderPaddingRight,long(2)); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("A"); var_Items->AddItem("B"); var_Items->AddItem("C"); var_Items->AddItem("D"); spGrid1->EndUpdate(); |
1111 |
How can I change the font for entire column (method 3)
// AddItem event - Occurs after a new Item has been inserted to Items collection. void OnAddItemGrid1(long Item) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); /* Copy and paste the following directives to your header file as it defines the namespace 'stdole' for the library: 'OLE Automation' #import <stdole2.tlb> */ var_Items->PutCellFont(Item,long(1),IFontDispPtr(((stdole::FontPtr)(spGrid1->GetColumns()->GetItem(long(1))->GetData())))); var_Items->PutCellBold(Item,long(1),VARIANT_TRUE); var_Items->PutCellForeColor(Item,long(1),RGB(255,0,0)); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderHeight(24); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->GetColumns()->Add(L"C1"); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"C2"))); var_Column->PutHTMLCaption(L"<b><font Tahoma;14>C2"); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ stdole::FontPtr f = ::CreateObject(L"StdFont"); f->PutName(L"Tahoma"); f->PutSize(_variant_t(long(11))); var_Column->PutData(((stdole::FontPtr)(f))); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem(long(10)),long(1),long(11)); var_Items->PutCellValue(var_Items->AddItem(long(12)),long(1),long(13)); spGrid1->EndUpdate(); |
1110 |
How can I change the font for entire column (method 2)
// AddItem event - Occurs after a new Item has been inserted to Items collection. void OnAddItemGrid1(long Item) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'stdole' for the library: 'OLE Automation' #import <stdole2.tlb> */ stdole::FontPtr f = ::CreateObject(L"StdFont"); f->PutName(L"Tahoma"); f->PutSize(_variant_t(long(11))); var_Items->PutCellFont(Item,long(1),IFontDispPtr(((stdole::FontPtr)(f)))); var_Items->PutCellBold(Item,long(1),VARIANT_TRUE); var_Items->PutCellForeColor(Item,long(1),RGB(255,0,0)); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderHeight(24); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->GetColumns()->Add(L"C1"); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"C2")))->PutHTMLCaption(L"<b><font Tahoma;14>C2"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem(long(10)),long(1),long(11)); var_Items->PutCellValue(var_Items->AddItem(long(12)),long(1),long(13)); spGrid1->EndUpdate(); |
1109 |
How can I change the font for entire column (method 1)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = spGrid1->GetConditionalFormats()->Add(L"1",vtMissing); var_ConditionalFormat->PutBold(VARIANT_TRUE); var_ConditionalFormat->PutForeColor(RGB(255,0,0)); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'stdole' for the library: 'OLE Automation' #import <stdole2.tlb> */ stdole::FontPtr f = ::CreateObject(L"StdFont"); f->PutName(L"Tahoma"); f->PutSize(_variant_t(long(11))); var_ConditionalFormat->PutFont(IFontDispPtr(((stdole::FontPtr)(f)))); var_ConditionalFormat->PutApplyTo(EXGRIDLib::FormatApplyToEnum(0x1)); spGrid1->PutHeaderHeight(24); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->GetColumns()->Add(L"C1"); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"C2")))->PutHTMLCaption(L"<b><font Tahoma;14>C2"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem(long(10)),long(1),long(11)); var_Items->PutCellValue(var_Items->AddItem(long(12)),long(1),long(13)); spGrid1->EndUpdate(); |
1108 |
I am using ExComboBox as an user editor, how can I display a different column
// UserEditorClose event - Fired the user editor is about to be opened. void OnUserEditorCloseGrid1(LPDISPATCH Object,long Item,long ColIndex) { // Items.CellValue(Item,ColIndex) = Object.Select("OrderID") } // UserEditorOleEvent event - Occurs when an user editor fires an event. void OnUserEditorOleEventGrid1(LPDISPATCH Object,LPDISPATCH Ev,BOOL FAR* CloseEditor,long Item,long ColIndex) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); OutputDebugStringW( L"Ev" ); } // UserEditorOpen event - Occurs when an user editor is about to be opened. void OnUserEditorOpenGrid1(LPDISPATCH Object,long Item,long ColIndex) { // Object.Select("OrderID") = Me.Items.CellValue(Item,ColIndex) } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutSortOnClick(EXGRIDLib::exNoSort); EXGRIDLib::IEditorPtr var_Editor = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Exontrol.ComboBox")))->GetEditor(); var_Editor->PutEditType(EXGRIDLib::UserEditorType); var_Editor->UserEditor(L"Exontrol.ComboBox",L""); ObjectPtr var_Object = var_Editor->GetUserEditorObject(); spGrid1->PutDrawGridLines(EXGRIDLib::exRowLines); spGrid1->PutTreeColumnIndex(-1); spGrid1->PutDefaultItemHeight(21); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("shows always the drop-down editor"); var_Items->PutCellHAlignment(h,long(0),EXGRIDLib::CenterAlignment); var_Items->PutItemDivider(h,0); var_Items->PutItemDividerLineAlignment(h,EXGRIDLib::DividerCenter); var_Items->PutSelectableItem(h,VARIANT_FALSE); var_Items->PutEnableItem(h,VARIANT_FALSE); var_Items->PutCellEditorVisible(var_Items->AddItem(long(10248)),long(0),EXGRIDLib::exEditorVisible); var_Items->PutCellEditorVisible(var_Items->AddItem(long(10249)),long(0),EXGRIDLib::exEditorVisible); var_Items->PutCellEditorVisible(var_Items->AddItem(long(10250)),long(0),EXGRIDLib::exEditorVisible); h = var_Items->AddItem("shows the drop-down editor when user clicks it"); var_Items->PutCellHAlignment(h,long(0),EXGRIDLib::CenterAlignment); var_Items->PutItemDivider(h,0); var_Items->PutItemDividerLineAlignment(h,EXGRIDLib::DividerCenter); var_Items->PutSelectableItem(h,VARIANT_FALSE); var_Items->PutEnableItem(h,VARIANT_FALSE); var_Items->AddItem(long(10248)); var_Items->AddItem(long(10249)); var_Items->AddItem(long(10250)); spGrid1->EndUpdate(); |
1107 |
The ItemHeight property is not working (method 2)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutColumnAutoResize(VARIANT_FALSE); spGrid1->PutScrollBySingleLine(VARIANT_TRUE); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Column")))->PutWidth(128); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellSingleLine(var_Items->AddItem("This is a bit of text that should break the line"),long(0),EXGRIDLib::exCaptionWordWrap); long h = var_Items->AddItem(""); var_Items->PutItemDivider(h,0); var_Items->PutSelectableItem(h,VARIANT_FALSE); var_Items->PutItemDividerLineAlignment(h,EXGRIDLib::DividerCenter); var_Items->PutItemHeight(h,3); var_Items->PutCellSingleLine(var_Items->AddItem("This is a bit of text that should break the line"),long(0),EXGRIDLib::exCaptionWordWrap); spGrid1->EndUpdate(); |
1106 |
The ItemHeight property is not working (method 1)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutColumnAutoResize(VARIANT_FALSE); spGrid1->PutScrollBySingleLine(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Column"))); var_Column->PutWidth(128); var_Column->PutDef(EXGRIDLib::exCellSingleLine,long(0)); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("This is a bit of text that should break the line"); long h = var_Items->AddItem(""); var_Items->PutItemDivider(h,0); var_Items->PutSelectableItem(h,VARIANT_FALSE); var_Items->PutItemDividerLineAlignment(h,EXGRIDLib::DividerCenter); var_Items->PutItemMinHeight(h,3); var_Items->PutItemMaxHeight(h,3); var_Items->AddItem("This is a bit of text that should break the line"); spGrid1->EndUpdate(); |
1105 |
How do I add a total field locked at the bottom of the control
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. void OnAddGroupItemGrid1(long Item) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutItemDividerLine(Item,EXGRIDLib::EmptyLine); var_Items->PutFormatCell(Item,var_Items->GetGroupItem(Item),L"value + ` Min: <b>` + %13 + `</b> Max: <b>` + %14 + `</b> Sum: <b>` + %15 + `</b>, of Freight column`"); var_Items->PutCellValue(Item,"Min","min(current,all,dbl(%6))"); var_Items->PutCellValueFormat(Item,"Min",EXGRIDLib::exTotalField); var_Items->PutCellValue(Item,"Max","max(current,all,dbl(%6))"); var_Items->PutCellValueFormat(Item,"Max",EXGRIDLib::exTotalField); var_Items->PutCellValue(Item,"Sum","sum(current,all,dbl(%6))"); var_Items->PutCellValueFormat(Item,"Sum",EXGRIDLib::exTotalField); var_Items->PutItemBackColor(Item,RGB(240,240,240)); } // Change event - Occurs when the user changes the cell's content. void OnChangeGrid1(long Item,long ColIndex,VARIANT FAR* NewValue) { EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->Refresh(); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHasLines(EXGRIDLib::exNoLine); spGrid1->PutDescription(EXGRIDLib::exColumnsFloatBar,L"Show/Hide"); spGrid1->PutColumnsFloatBarSortOrder(EXGRIDLib::SortAscending); spGrid1->PutColumnsFloatBarVisible(EXGRIDLib::exColumnsFloatBarVisibleIncludeCheckColumns); spGrid1->PutColumnAutoResize(VARIANT_FALSE); spGrid1->PutBackColorSortBar(RGB(240,240,240)); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library' #import <msado15.dll> rename("EOF","REOF") */ ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset"); rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0); spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs))); spGrid1->PutSingleSort(VARIANT_FALSE); spGrid1->PutSortBarVisible(VARIANT_TRUE); spGrid1->PutAllowGroupBy(VARIANT_TRUE); spGrid1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column."); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Min"))); var_Column->PutVisible(VARIANT_FALSE); var_Column->PutAllowDragging(VARIANT_FALSE); var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Max"))); var_Column->PutVisible(VARIANT_FALSE); var_Column->PutVisible(VARIANT_FALSE); var_Column->PutAllowDragging(VARIANT_FALSE); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Sum"))); var_Column1->PutVisible(VARIANT_FALSE); var_Column1->PutVisible(VARIANT_FALSE); var_Column1->PutAllowDragging(VARIANT_FALSE); EXGRIDLib::IColumnPtr var_Column2 = spGrid1->GetColumns()->GetItem("Freight"); var_Column2->PutFormatColumn(L"currency(value)"); var_Column2->PutDef(EXGRIDLib::exCellBackColor,long(12895487)); var_Column2->PutDef(EXGRIDLib::exHeaderBackColor,var_Column2->GetDef(EXGRIDLib::exCellBackColor)); var_Column2->PutHeaderBold(VARIANT_TRUE); var_Column2->PutAllowGroupBy(VARIANT_FALSE); var_Column2->PutAlignment(EXGRIDLib::RightAlignment); spGrid1->PutScrollBySingleLine(VARIANT_FALSE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutLockedItemCount(EXGRIDLib::exBottom,2); long hL = var_Items->GetLockedItem(EXGRIDLib::exBottom,0); var_Items->PutItemDivider(hL,0); var_Items->PutItemHeight(hL,3); var_Items->PutItemDividerLineAlignment(hL,EXGRIDLib::DividerTop); var_Items->PutItemDividerLine(hL,EXGRIDLib::DoubleLine); hL = var_Items->GetLockedItem(EXGRIDLib::exBottom,1); var_Items->PutCellValue(hL,long(6),"sum(all,rec,dbl(%6))"); var_Items->PutCellValueFormat(hL,long(6),EXGRIDLib::exTotalField); var_Items->PutItemHeight(hL,24); var_Items->PutItemBold(hL,VARIANT_TRUE); spGrid1->GetColumns()->GetItem("EmployeeID")->PutSortOrder(VARIANT_TRUE); spGrid1->EndUpdate(); |
1104 |
How can I add a total field, when I use grouping
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. void OnAddGroupItemGrid1(long Item) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutItemDividerLine(Item,EXGRIDLib::EmptyLine); var_Items->PutFormatCell(Item,var_Items->GetGroupItem(Item),L"value + ` Min: <b>` + %13 + `</b> Max: <b>` + %14 + `</b> Sum: <b>` + %15 + `</b>, of Freight column`"); var_Items->PutCellValue(Item,"Min","min(current,all,dbl(%6))"); var_Items->PutCellValueFormat(Item,"Min",EXGRIDLib::exTotalField); var_Items->PutCellValue(Item,"Max","max(current,all,dbl(%6))"); var_Items->PutCellValueFormat(Item,"Max",EXGRIDLib::exTotalField); var_Items->PutCellValue(Item,"Sum","sum(current,all,dbl(%6))"); var_Items->PutCellValueFormat(Item,"Sum",EXGRIDLib::exTotalField); var_Items->PutItemBackColor(Item,RGB(240,240,240)); } // Change event - Occurs when the user changes the cell's content. void OnChangeGrid1(long Item,long ColIndex,VARIANT FAR* NewValue) { EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->Refresh(); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHasLines(EXGRIDLib::exNoLine); spGrid1->PutColumnAutoResize(VARIANT_FALSE); spGrid1->PutBackColorSortBar(RGB(240,240,240)); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library' #import <msado15.dll> rename("EOF","REOF") */ ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset"); rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0); spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs))); spGrid1->PutSingleSort(VARIANT_FALSE); spGrid1->PutSortBarVisible(VARIANT_TRUE); spGrid1->PutAllowGroupBy(VARIANT_TRUE); spGrid1->GetColumns()->GetItem(long(1))->PutSortOrder(VARIANT_TRUE); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Min")))->PutVisible(VARIANT_FALSE); ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Max")))->PutVisible(VARIANT_FALSE); ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Sum")))->PutVisible(VARIANT_FALSE); EXGRIDLib::IColumnPtr var_Column = spGrid1->GetColumns()->GetItem("Freight"); var_Column->PutDef(EXGRIDLib::exCellBackColor,long(12895487)); var_Column->PutDef(EXGRIDLib::exHeaderBackColor,var_Column->GetDef(EXGRIDLib::exCellBackColor)); var_Column->PutHeaderBold(VARIANT_TRUE); var_Column->PutAllowGroupBy(VARIANT_FALSE); spGrid1->PutScrollBySingleLine(VARIANT_FALSE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutLockedItemCount(EXGRIDLib::exBottom,1); long hL = var_Items->GetLockedItem(EXGRIDLib::exBottom,0); var_Items->PutItemDivider(hL,0); var_Items->PutItemHeight(hL,24); var_Items->PutItemDividerLineAlignment(hL,EXGRIDLib::DividerTop); var_Items->PutItemDividerLine(hL,EXGRIDLib::DoubleLine); var_Items->PutCellValue(hL,long(0),"sum(all,rec,dbl(%6))"); var_Items->PutCellValueFormat(hL,long(0),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML)); var_Items->PutCellHAlignment(hL,long(0),EXGRIDLib::RightAlignment); var_Items->PutFormatCell(hL,long(0),L"'Freight: <bgcolor=FFC4C4> '+(value format ``) + ` `"); spGrid1->EndUpdate(); |
1103 |
How do I use the ColumnsFloatBarVisible on exColumnsFloatBarVisibleIncludeCheckColumns
|
1102 |
How do I use the ColumnsFloatBarVisible on exColumnsFloatBarVisibleIncludeHiddenColumn
|
1101 |
How do I use the ColumnsFloatBarVisible on exColumnsFloatBarVisibleIncludeGroupByColumns
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutColumnAutoResize(VARIANT_FALSE); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); var_Columns->Add(L"City"); var_Columns->Add(L"Start"); var_Columns->Add(L"End"); spGrid1->PutAllowGroupBy(VARIANT_TRUE); spGrid1->PutSortBarVisible(VARIANT_TRUE); spGrid1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column."); spGrid1->PutBackColorSortBar(RGB(250,250,250)); spGrid1->PutDescription(EXGRIDLib::exColumnsFloatBar,L"Group-By"); spGrid1->PutColumnsFloatBarVisible(EXGRIDLib::exColumnsFloatBarVisibleIncludeGroupByColumns); spGrid1->PutColumnsFloatBarSortOrder(EXGRIDLib::SortAscending); spGrid1->GetColumns()->GetItem("City")->PutSortOrder(EXGRIDLib::SortAscending); spGrid1->EndUpdate(); |