Telerik Forums
UI for WPF Forum
1 answer
199 views

Hi,

 

I would like to know if its possible to display a heat map with different item sizes? We need to visualize road conditions and we use a custom built chart using writable bitmap currently.

 

I am busy replacing these charts with Telerik controls. But all the examples ive seen for the heatmap, all items are the same size.

 

I have attached our current HeatMap, highlighted with Yellow rectangle. 

Dinko | Tech Support Engineer
Telerik team
 answered on 13 Oct 2015
1 answer
63 views

Hello,

I'm not capable of doing a Telerik RadGridView with a combobox to manage Edit and Delete actions (see image attached).

The combobox has 2 options "Edit" and "Delete".
I want the control to do:

  • When selecting "Edit": show a popup to edit Name, Last Name and Age.
  • When selecting "Detele": show a DialogMessageBox to confirm or cancel.

 

The problem is that the GridView doesn't fire the SelectedIndexChanged event when I select the combobox.

Could you help me with this? Is there any example that I can see?

Thanks for your help!

Martin
Telerik team
 answered on 13 Oct 2015
1 answer
208 views

I've created a new command in my ViewModel of the scheduleview that works properly in a context menu associated with the scheduleview, however when I try and place this command on a button outside the scheduleview control it doesn't trigger that an appointment has been selected or not. 

I can make the CanExecute always return true and then it will fire the event properly when clicked, however I need it to disable/enable when an appointment is selected and it has specific values set in the appointment.  The edit button triggers the selection changed ok when outside the schedule view.  How do I get this same functionality for my command/button?

public DelegateCommand StartVisitCommand { get { return this.startVisitCommand; } set { this.startVisitCommand = value; } }

<telerik:RadButton Content="Start Visit" Grid.Column="4"
 Command="{Binding DataContext.StartVisitCommand, ElementName=scheduleview}" CommandTarget="{Binding ElementName=scheduleview}"
CommandParameter="{Binding SelectedAppointments, ElementName=scheduleview}"
DockPanel.Dock="Right"
 />

private void StartVisitCommandExecuted(object parameter)
{
    IEnumerable appointments = parameter as IEnumerable;
    SqlAppointment appt = appointments.OfType<SqlAppointment>().Where(x => x.TimeMarkerID == 3).FirstOrDefault();
 
    SchedulingInterface.CreateDocumentationByAppt(appt);
}
 
 
private static bool CanExecuteStartVisitCommand(object parameter)
{
    IEnumerable appointments = parameter as IEnumerable;
    if (appointments != null)
    {
        SqlAppointment appt = appointments.OfType<SqlAppointment>().Where(x => x.TimeMarkerID == 3).FirstOrDefault();
        if (appt != null)
            return appt.CurrentTimeMarkerId == "3";
    }
    return false;
}

Kalin
Telerik team
 answered on 13 Oct 2015
1 answer
306 views

I have been trying to get a different color on a Grid, and all I have seen are where you have to override the ControlTemplate. I also tried setting the color of specific color resource, but that did not work either. Here is my xaml

  <Style x:Key="GridRadGridView" TargetType="{x:Type telerik:RadGridView}">
<Style.Resources>
<Style TargetType="telerik:GridViewHeaderCell"
BasedOn="{StaticResource {x:Type telerik:GridViewHeaderCell}}">
<Setter Property="Background" Value="#014C6C" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Foreground" Value="White" />
</Style>
</Style.Resources>
<Setter Property="AutoGenerateColumns" Value="False" />
<Setter Property="HeaderRowStyle" >
<Setter.Value>
<Style TargetType="telerik:GridViewHeaderRow"
BasedOn="{StaticResource {x:Type telerik:GridViewHeaderRow}}">
<Setter Property="Background" Value="#014C6C" />
<Setter Property="Foreground" Value="White" />
<Setter Property="BorderThickness" Value="0" />
</Style>
</Setter.Value>
</Setter>
<Setter Property="GroupRowStyle">
<Setter.Value>
<Style BasedOn="{StaticResource {x:Type telerik:GridViewGroupRow}}"
TargetType="telerik:GridViewGroupRow">
<Setter Property="Background" Value="#F8F8F8" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Foreground" Value="Black" />
<Setter Property="BorderThickness" Value="0 0 0 1" />
<!--<Setter Property="GroupHeaderTemplate">
<Setter.Value>
<DataTemplate >
</DataTemplate>
</Setter.Value>
</Setter>-->
</Style>
</Setter.Value>
</Setter>
<!--<Setter Property="RowStyle">
<Setter.Value>
<Style TargetType="telerik:GridViewRow"
BasedOn="{StaticResource {x:Type telerik:GridViewRow}}">
<Setter Property="Background" Value="#F9F9F9" />
--><!--<Trigger Property="IsCurrent" Value="True">
<Setter Property="Background" Value="#D7EFF9"/>
</Trigger>--><!--
</Style>
</Setter.Value>
</Setter>-->
<Setter Property="IsReadOnly" Value="True" />
<Setter Property="FontFamily" Value="Nunito" />
<Setter Property="ShowGroupPanel" Value="True" />
<Setter Property="FontSize" Value="14" />
<Setter Property="RowIndicatorVisibility" Value="Collapsed" />
<Setter Property="GridLinesVisibility" Value="Horizontal" />
<Setter Property="ScrollMode" Value="RealTime" />
<Setter Property="ScrollViewer.CanContentScroll" Value="True" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Visible" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Visible" />
</Style>

Maya
Telerik team
 answered on 13 Oct 2015
2 answers
111 views

Hi everyone.

I hate to post stacktraces without details on how to replicate, but I'm in one of those "impossible to consistently replicate but get enough error reports that it's starting to drive me insane" kind of situations.  Every so often, I get this unhandled exception that crashes an application with a rapidly updating RadGridView.

System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Windows.Controls.GridView.GridViewCell.UpdateValue()
   at Telerik.Windows.Controls.GridView.GridViewCell.SetCellElement()
   at Telerik.Windows.Controls.GridView.GridViewRow.PrepareCell(GridViewCellBase cellBase, GridViewColumn column)
   at Telerik.Windows.Controls.GridView.GridViewCellsPanel.PrepareCell(GridViewCellBase cell, GridViewColumn column)
   at Telerik.Windows.Controls.GridView.GridViewCellsPanel.GetVirtualizedCell(GridViewColumn column, Boolean createIfNull)
   at Telerik.Windows.Controls.GridView.GridViewCellsPanel.RealizeAndMeasureCells(Int32 startIndex, Int32 predictedLastIndex, Func`2 calculateNextIndex)
   at Telerik.Windows.Controls.GridView.GridViewCellsPanel.UpdateVirtualizedCells()
   at Telerik.Windows.Controls.GridView.GridViewCellsPanel.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at APSSGuardianAVL.App.Main()

 

Posting this in hopes that someone has seen it before, or admins know this is a bug that has been addressed.

Thanks.

intellitechcorporation
Top achievements
Rank 1
 answered on 12 Oct 2015
5 answers
294 views

Hi,

I have a RadTileList which fills the entire width of the screen. By default it has a right padding (50px I guess which is perfect) and I would like to add the same on the left exactly the same way it's done in the demo app.

But I can't find where it's defined, I'm stuck in my research in RadTileListTemplate # ItemsPresenter

 Thanks,

Rémi.

Maya
Telerik team
 answered on 12 Oct 2015
1 answer
962 views

Hello,

I am attempting to retain the position of the scroll position of the RadGridView depending on the action being performed by the user during a ReBind() event.  I found a solution presented already before but I am having problems implementing it: http://www.telerik.com/forums/scrollviewer-in-radgridview.  It only seems to work intermittently.  Even though the contents and row count are not changing, sometimes the scroll stays perfectly still as expected, sometimes nudges slightly, sometimes jumps 5-10 rows losing focus on whatever the user was doing and confusing them.  Oddly it always seems to work on subsequent Rebind() events unless the user adjusts the scroll position again and the problem begins to repeat.  Is there anything that can be done to prevent or fix this unpredictable ​behavior?

 

var scrollViewer = this.radGridView.ChildrenOfType<GridViewScrollViewer>().FirstOrDefault();
//Get horizontal and vertical offsets
var horizontalOffset = scrollViewer.HorizontalOffset;
var verticalOffset = scrollViewer.VerticalOffset;
     
//Set horizontal and vertical offsets   
scrollViewer.ScrollToHorizontalOffset(horizontalOffset);
scrollViewer.ScrollToVerticalOffset(verticalOffset);

 

 

 

Ivan Ivanov
Telerik team
 answered on 12 Oct 2015
3 answers
120 views

so i have RadScheduleView and RadCalendar, SelectedDate and CurrentDate is bound so when i change the dates in calendar, it will also change in ScheduleView.

here's the problem, i want to make another ScheduleView with the same appointment but when i add it, both ScheduleView's CurrentDate is no longer bound to the SelectedDate, why?

and how can i make a Hourly View Appointment? it's like i want to make the 2nd ScheduleView to Hourly so i have an option to open it from the 1st ScheduleView (Day View). for example when i click the slot/appointment at 1:00 time, i will be able to go to 2nd ScheduleView that have timer 1:10 1:20 ... 1:50 something like that so i can make appointment per-10min.

Nasko
Telerik team
 answered on 12 Oct 2015
5 answers
128 views

Hi,

 

I have RadGridView binded to QueryableEntityCollectionView. I want to sort only items on current page by click on column header, not  full data from server.

I was trying to sort items in GridView_Sorting event, set e.NewSortingState  and e.Cancel = true but without any success. Can't access and sort items from current page.

 

Any help?

Ivan Ivanov
Telerik team
 answered on 12 Oct 2015
8 answers
642 views
Are y'all still working on this one?

System.Windows.Data Error: 26 : ItemTemplate and ItemTemplateSelector are ignored for items already of the ItemsControl's container type; Type='RadWatermarkTextBox'
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=WatermarkTextBox'. BindingExpression:Path=ActualWidth; DataItem=null; target element is 'AutoCompleteBoxesWrapPanel' (Name=''); target property is 'Width' (type 'Double')

It really is annoying when one is trying to make sure that any and all binding errors in the output window are gone.  It would be nice if you guys could rid us of these please.   Or is there something I can do to suppress or get rid of these? 

Thanks
Paul
Nasko
Telerik team
 answered on 12 Oct 2015
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Slider
Expander
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?