GrapeCity.Win.MultiRow.v80 アセンブリ > GrapeCity.Win.MultiRow 名前空間 > Cell クラス : Selected プロパティ |
例外 | 解説 |
---|---|
System.InvalidOperationException | 設計時にプロパティが設定されました。 または Cellが選択可能でないときにプロパティがtrueに設定されました。 または ScopeがCellScope.Rowでなく、GcMultiRow.ViewModeがViewMode.ListBoxであるときに、プロパティがtrueに設定されました。 |
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