GrapeCity MultiRow Windows Forms Documentation
Zoomed Display of the Drop-down List

In column header cells, it is possible to have a zoomed-in view of the drop-down list displayed during the touch operation. This section provides information about the zoomed-in display of the drop-down list.

Zoomed-in Display of the Drop-down List

In the column header cells, if you display the drop-down list using touch, the displayed size is larger than the size displayed during the mouse operation. The size of the drop-down list can be set using the TouchDropDownScale property of the cell.

  • The ColumnHeaderCell can have a zoomed-in view of the drop-down list, if it uses the HeaderDropDownContextMenu class.
  • The ColumnHeaderCell cannot have a zoomed-in view of the drop-down list, if it uses the HeaderDropDownList class.

Using Code

The following code enlarges the size of the drop-down list of the ColumnHeaderCell which is a common cell, to 200% of its default size.

[VB]

Imports System.Windows.Forms 
Imports GrapeCity.Win.MultiRow 
Dim textBoxCell1 = New TextBoxCell() 
textBoxCell1.Name = "textBoxCell1" 
textBoxCell1.Size = New Size(200, 20) 
Dim template As Template = template.CreateGridTemplate(New Cell() {textBoxCell1}) 
Dim columnHeaderCell = DirectCast(template.ColumnHeaders(0).Cells(0), ColumnHeaderCell) 
columnHeaderCell.DropDownList = New HeaderDropDownList("textBoxCell1", False, False) 
Dim headerDropDownContextMenu1 = New HeaderDropDownContextMenu() 
headerDropDownContextMenu1.Items.AddRange(New ToolStripItem() { New SortToolStripItem(), New SortToolStripItem(), 
New ToolStripSeparator(), New ShowAllToolStripItem(), New ToolStripSeparator(), New AutoFilterToolStripItem()}) ' Enlarge the size of the drop-down list to 200% of its default size. headerDropDownContextMenu1.TouchDropDownScale = 2.0F columnHeaderCell.DropDownContextMenuStrip = headerDropDownContextMenu1 GcMultiRow1.Template = template

[CS]

using System.Windows.Forms; 
using GrapeCity.Win.MultiRow; 
TextBoxCell textBoxCell1 = new TextBoxCell();
textBoxCell1.Name = "textBoxCell1"; 
textBoxCell1.Size = new Size(200, 20); 
Template template = Template.CreateGridTemplate(new Cell[] { textBoxCell1 });
ColumnHeaderCell columnHeaderCell = template.ColumnHeaders[0].Cells[0] as ColumnHeaderCell; 
columnHeaderCell.DropDownList = new HeaderDropDownList("textBoxCell1", false, false); 
HeaderDropDownContextMenu headerDropDownContextMenu1 = new HeaderDropDownContextMenu();
headerDropDownContextMenu1.Items.AddRange(new ToolStripItem[]{ new SortToolStripItem(), new SortToolStripItem(), 
new ToolStripSeparator(), new ShowAllToolStripItem(), new ToolStripSeparator(), new AutoFilterToolStripItem()}); // Enlarge the size of the drop-down list to 200% of its default size. headerDropDownContextMenu1.TouchDropDownScale = 2.0F; columnHeaderCell.DropDownContextMenuStrip = headerDropDownContextMenu1; gcMultiRow1.Template = template;
See Also

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options