GrapeCity.Win.MultiRow Namespace > GcMultiRow Class : SelectedCells Property |
<BrowsableAttribute(False)> <FeatureAttribute(Name="UISelection", Version="v5.0")> Public ReadOnly Property SelectedCells As SelectedCellCollection
Dim instance As GcMultiRow Dim value As SelectedCellCollection value = instance.SelectedCells
[Browsable(false)] [Feature(Name="UISelection", Version="v5.0")] public SelectedCellCollection SelectedCells {get;}
void getSelectionInformationButton_Click(object sender, EventArgs e) { string info = null; // Get a specific cell's selection state. info = "First Cell's Selection State: " + gcMultiRow1[0, 0].Selected; info += "\r\n\r\n"; // Get a specific row's selection state. info += "First Row's Selection State: " + gcMultiRow1.Rows[0].Selected; info += "\r\n\r\n"; info += "Selected cells List:"; // Get all selected cell list. foreach (Cell cell in this.gcMultiRow1.SelectedCells) { info += "\r\n"; info += "RowIndex: " + cell.RowIndex + ", CellIndex: " + cell.CellIndex; } info += "\r\n\r\n"; info += ("Selected rows List:"); // Get all selected row list. foreach (Row row in this.gcMultiRow1.SelectedRows) { info += "\r\n"; info += "RowIndex: " + row.Index; } MessageBox.Show(info); }
Private Sub getSelectionInformationButton_Click(ByVal sender As Object, ByVal e As EventArgs) Handles getSelectionInformationButton.Click Dim info As String = Nothing ' Get a specific cell's selection state. info = "First Cell's Selection State: " + gcMultiRow1(0, 0).Selected.ToString() info += vbCr & vbLf & vbCr & vbLf ' Get a specific row's selection state. info += "First Row's Selection State: " + gcMultiRow1.Rows(0).Selected.ToString() info += vbCr & vbLf & vbCr & vbLf info += "Selected cells List:" ' Get all selected cell list. For Each cell As Cell In Me.gcMultiRow1.SelectedCells info += vbCr & vbLf info += "RowIndex: " + cell.RowIndex.ToString() + ", CellIndex: " + cell.CellIndex.ToString() Next info += vbCr & vbLf & vbCr & vbLf info += ("Selected rows List:") ' Get all selected row list. For Each row As Row In Me.gcMultiRow1.SelectedRows info += vbCr & vbLf info += "RowIndex: " + row.Index.ToString() Next MessageBox.Show(info) End Sub
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2