GrapeCity MultiRow Windows Forms Documentation
View Modes

The GcMultiRow control supports four types of view modes. View modes can be set using the GcMultiRow.ViewMode property.

Default Mode

The current cell is selected with the default mode. The GcMultiRow.MultiSelect property determines whether the selection of multiple cells is allowed.

The following image shows a cell being clicked in default mode. The triangle icon in the image indicates the mouse cursor.

Default Mode

Set the GcMultiRow.ViewMode property to Default to use the default mode.

Using Code

This example sets the ViewMode property to Default.

[VB]

GcMultiRow1.ViewMode = GrapeCity.Win.MultiRow.ViewMode.Default

[CS]

gcMultiRow1.ViewMode = GrapeCity.Win.MultiRow.ViewMode.Default;

Row Mode

In row mode, the entire row is selected by default. When row mode is enabled, the GcMultiRow.MultiSelect property is set to rows.

Row Mode

Set the GcMultiRow.ViewMode property to Row in order to use row mode.

Using Code

This example sets the ViewMode property to Row.

[VB]

GcMultiRow1.ViewMode = GrapeCity.Win.MultiRow.ViewMode.Row

[CS]

gcMultiRow1.ViewMode = GrapeCity.Win.MultiRow.ViewMode.Row;

Display Mode

In display mode, the user cannot work on or edit the control except for scrolling and resizing.

Display Mode

To use display mode, set the GcMultiRow.ViewMode property to Display.

Using Code

This example sets the ViewMode property to Display.

[VB]

GcMultiRow1.ViewMode = GrapeCity.Win.MultiRow.ViewMode.Display

[CS]

gcMultiRow1.ViewMode = GrapeCity.Win.MultiRow.ViewMode.Display;

The following operations are disabled in display mode.

When display mode is enabled, the GcMultiRow.CurrentCell and GcMultiRow.CurrentRow properties return null reference (Nothing in Visual Basic).

ListBox Mode

In list box mode, you can toggle the row selection state by using the mouse click or by pressing the Space key. You need to set the GcMultiRow.ViewMode property to ListBox in order to use list box mode.

Using Code

This example sets the ViewMode property to ListBox.

[VB]

GcMultiRow1.ViewMode = GrapeCity.Win.MultiRow.ViewMode.ListBox

[CS]

gcMultiRow1.ViewMode = GrapeCity.Win.MultiRow.ViewMode.ListBox;

List box mode operates in the same way as a standard Listbox control (System.Windows.Forms.ListBox) that has the following settings.

[VB]

ListBox1.SelectionMode = SelectionMode.MultiSimple

[CS]

listBox1.SelectionMode = SelectionMode.MultiSimple;

The following operations are disabled in list box mode.

See Also

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options