or
Hi all,
Is there a way to hide non working hours in TimelineView with Timescales.Hours/HalfHours/Minutes
e.g. collapse Columns before and after the WorkTime-Timespan - thus allowing shorter drag+Drop movements
| Day 1 | Day 2 |
| 08 09 10 11 12 13 14 16 18 20| 08 09 10 11 12 13 14 16 18 20|
Currently I call my own RenderView() method which loops over all visible cells
void ActiveView_PropertyChanged(object sender, PropertyChangedEventArgs e) { switch (e.PropertyName) { case "StartDate":It would be more convinient to subscribe to a ElementRender Event and set the background color there - like the one exposed in RadCalendar.
''' <summary>''' Sql Server notifies the scheduler table data is changed!''' The current scheduler data needs to rebind to reflect the changes...''' </summary>''' <param name="sender"></param>''' <param name="e"></param>''' <remarks></remarks>Private Sub AgendaWijziging(sender As Object, e As System.Data.SqlClient.SqlNotificationEventArgs) If Me.InvokeRequired Then RadScheduler1.BeginInvoke(New MethodInvoker(AddressOf radScheduler1_rebind)) Else radScheduler1_rebind() End IfEnd Sub''' <summary>''' Rebind the scheduler after a database change by another client''' </summary>''' <remarks></remarks>Private Sub radScheduler1_rebind() Try Me.Cursor = Cursors.WaitCursor ' attempt to find current first time slot in view (user scrolled to this time slot) 'Dim dayView As SchedulerDayViewGroupedByResourceElement = TryCast(Me.RadScheduler1.SchedulerElement.ViewElement, SchedulerDayViewGroupedByResourceElement) 'Dim singleDayView As SchedulerDayViewElement = Nothing 'Dim resetToTime As DateTime? = Nothing 'Dim firstCell As SchedulerCellElement 'If dayView IsNot Nothing Then ' singleDayView = dayView.GetDayViewElements.FirstOrDefault ' If singleDayView IsNot Nothing Then ' firstCell = singleDayView.DataAreaElement.Table.Children.First ' If firstCell IsNot Nothing Then ' resetToTime = CType(cell, SchedulerCellElement).Date (date only... no time?)
' End If ' End If 'End If RadScheduler1.DataBind() ' go back to the timeslot the user scrolled to.. (does not work :( resetToTime contains date only )
'If singleDayView IsNot Nothing AndAlso resetToTime IsNot Nothing Then ' singleDayView.DataAreaElement.Table.ScrollToTime(New TimeSpan(resetToTime.Value.Hour, resetToTime.Value.Minute, resetToTime.Value.Second)) 'End If ' re-initialize the sql broker notification _context.MonitorAgenda() Catch ex As Exception Dim currentMethode As MethodBase = MethodBase.GetCurrentMethod FormHelper.LogError(ex, currentMethode.DeclaringType.ToString, currentMethode.ToString) Finally Me.Cursor = Cursors.Arrow End TryEnd Subprivate void LoadGrid(){ DataTable dataTable = new DataTable(); DataColumn itemIdColumn = new DataColumn("ItemId", typeof(int)); DataColumn itemCodeColumn = new DataColumn("ItemCode", typeof(string)); DataColumn itemNameColumn = new DataColumn("ItemName", typeof(string)); DataColumn sellPriceColumn = new DataColumn("SellPrice", typeof(decimal)); DataColumn vatValueColumn = new DataColumn("VatValue", typeof(decimal)); DataColumn itemTypeColumn = new DataColumn("ItemType", typeof(int)); dataTable.Columns.Add(itemCodeColumn); dataTable.Columns.Add(itemNameColumn); dataTable.Columns.Add(sellPriceColumn); dataTable.Columns.Add(vatValueColumn); dataTable.Columns.Add(itemTypeColumn); dataTable.Columns.Add(itemIdColumn); dataTable.BeginLoadData(); var lst = _relatedItemBc.GetItemsForMainGrid(FilteredItem); for (int i = 0; i < lst.Count; i++) { DataRow row = dataTable.NewRow(); row["ItemCode"] = lst[i].ItemCode; row["ItemName"] = lst[i].ItemName; row["SellPrice"] = lst[i].SellPrice; row["VatValue"] = lst[i].VATValue; row["ItemType"] = lst[i].ItemType; row["ItemId"] = lst[i].ItemID; dataTable.Rows.Add(row); } dataTable.EndLoadData(); rbcDataGridViewMain.MasterTemplate.BeginUpdate(); rbcDataGridViewMain.DataSource = dataTable; rbcDataGridViewMain.MasterTemplate.EndUpdate();}Me.RadGridView1.Columns("Date").ExcelExportType = DisplayFormatType.Custom
Me.RadGridView1.Columns("Date").ExcelExportFormatString = " mm/dd/yyyy "
Dim exporter As Export.ExportToExcelML = New Export.ExportToExcelML(Me.RadGridView1)
exporter.FileExtension = "xls"
exporter.HiddenColumnOption = HiddenOption.DoNotExport
exporter.ExportVisualSettings = True
exporter.RunExport(fileName)GridView.Rows[4].Cells[myColumn.name].Value