GrapeCity.Win.CalendarGrid.v20 アセンブリ > GrapeCity.Win.CalendarGrid 名前空間 > GcCalendarGrid クラス : SelectedCells プロパティ |
Public ReadOnly Property SelectedCells As ReadOnlyCollection(Of CalendarCellPosition)
public ReadOnlyCollection<CalendarCellPosition> SelectedCells {get;}
void getSelectionInformationButton_Click(object sender, EventArgs e) { string info = null; info += "Selected cells List:"; // Get all selected cell list. foreach (CalendarCellPosition cell in this.gcCalendarGrid.SelectedCells) { info += "\r\n"; info += "Date: " + cell.Date + ",RowIndex: " + cell.RowIndex + ", ColumnIndex: " + cell.ColumnIndex; } info += "\r\n\r\n"; info += ("Selected Dates List:"); // Get all selected row list. foreach (DateTime date in this.gcCalendarGrid.SelectedDates) { info += "\r\n"; info += "DateTime: " + date; } MessageBox.Show(info); }
Private Sub getSelectionInformationButton_Click(sender As Object, e As EventArgs) Dim info As String = Nothing info += "Selected cells List:" ' Get all selected cell list. For Each cell As CalendarCellPosition In Me.gcCalendarGrid.SelectedCells info += vbCr & vbLf info += "Date: " + cell.[Date] + ",RowIndex: " + cell.RowIndex + ", ColumnIndex: " + cell.ColumnIndex Next info += vbCr & vbLf & vbCr & vbLf info += ("Selected Dates List:") ' Get all selected row list. For Each [date] As DateTime In Me.gcCalendarGrid.SelectedDates info += vbCr & vbLf info += "DateTime: " + [date] Next MessageBox.Show(info) End Sub
void getSelectionInformationButton_Click(object sender, EventArgs e) { string info = null; info += "Selected cells List:"; // Get all selected cell list. foreach (CalendarCellPosition cell in this.gcCalendarGrid.SelectedCells) { info += "\r\n"; info += "Date: " + cell.Date + ",RowIndex: " + cell.RowIndex + ", ColumnIndex: " + cell.ColumnIndex; } info += "\r\n\r\n"; info += ("Selected Dates List:"); // Get all selected row list. foreach (DateTime date in this.gcCalendarGrid.SelectedDates) { info += "\r\n"; info += "DateTime: " + date; } MessageBox.Show(info); }
Private Sub getSelectionInformationButton_Click(sender As Object, e As EventArgs) Dim info As String = Nothing info += "Selected cells List:" ' Get all selected cell list. For Each cell As CalendarCellPosition In Me.gcCalendarGrid.SelectedCells info += vbCr & vbLf info += "Date: " + cell.[Date] + ",RowIndex: " + cell.RowIndex + ", ColumnIndex: " + cell.ColumnIndex Next info += vbCr & vbLf & vbCr & vbLf info += ("Selected Dates List:") ' Get all selected row list. For Each [date] As DateTime In Me.gcCalendarGrid.SelectedDates info += vbCr & vbLf info += "DateTime: " + [date] Next MessageBox.Show(info) End Sub