Telerik Forums
UI for WPF Forum
4 answers
286 views
Hello, I'm struggling to find guidance in your documentation on how to implement a print preview for your radgridview.  Can you point me to a clear example on how to accomplish this?

Thanks
Dimitrina
Telerik team
 answered on 28 Jan 2013
12 answers
113 views
We have one computer out of many that is having issues with grouping in the gridview. It happens to be the only hp touchsmart in the whole company.

Here is some detail:
WPF 2012.3.1224.40
.NET 4 C#
HP Touchsmart 310-1126
Gridview is inside docking.
Gridview itemsource bound to filteredsource of datafilter.
datafilter itemsource bound to datatable.

When user adds group in group header or program programatically adds grouping we get the followin error from 3-10 times immeditally (same exception over and over at once). We follow the same steps on a bunch of other computers and no issues...

Message: Object reference not set to an instance of an object.

 

Source: Telerik.Windows.Controls.GridView

 

Trace:    at Telerik.Windows.Automation.Peers.GridViewGroupRowAutomationPeer.GetNameCore()

   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()

   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()

   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()

   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()

   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()

   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()

   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()

   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()

   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()

   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()

   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()

   at System.Windows.ContextLayoutManager.fireAutomationEvents()

   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.AnimatedRenderMessageHandler(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)

 

Yordanka
Telerik team
 answered on 28 Jan 2013
1 answer
398 views
Hi

I'm looking for a sample for using encryption when exporting pdf files. It should be available now: http://www.telerik.com/support/pits.aspx#/details/Issue=10766

Thanks

Mike
Iva Toteva
Telerik team
 answered on 28 Jan 2013
1 answer
182 views
Whenever I get into VS 2010 I'll get a message that there's an update to the Telerik WPF VSExtensions (my current version is 2011.3.1305.0, and it says the new version is 2012.3.1212.0.) When I tried to update it I get the following error:

"The extension could not be installed because the following error occurred: Telerik WPF VSExtensions is already installed."
Biliana Ficheva
Telerik team
 answered on 28 Jan 2013
2 answers
121 views
I'm trying to figure out a way to have a RadGridView with paging, but NOT have the RadGridView filter based on the page: but simply jump to the page. And the page count be based on the total number of displayed items (based of course on the size of the window).

There's no happy number for 'items on a page' that I can choose that actually work for everybody, with their different resolutions and such. And letting them set it just makes it more complicated. I'm really just looking for a control that's a lot like the RadDataPager, but just tracks and controls the RadGridView's current top-shown record.

Or, alternatively, the "Pager" control could just let you jump to sections based on the first letter of the items. Like, A, B, C D, etc.
Jerome
Top achievements
Rank 1
 answered on 25 Jan 2013
3 answers
296 views
Hi,
     I am using MVVm pattern. I have a telrik radGridView which is bound to a datatable which has some uncertain columns and rows,and AutoGeneratedColumns property is true. Now I want to set CellStyle of GridView base on some condition,but I am not finding any CellStyle property in TelrikRdGridView. Is it possible to change the cellstyle of autogenerated columns using MVVM pattern?
Yoan
Telerik team
 answered on 25 Jan 2013
7 answers
346 views
This is our scenario:
  • We have a GridView in a RadPane.
  • We have the utility to add columns to the GridView separately as opposed to doing it thru the intrinsic GridView feature. There's just too much codebase that's why we continue with our current approach.
  • We add columns dynamically thru codes

If we add more columns and some of them go beyond the visible portion of the grid, the horizontal scrollbar does not show. It shows only if we resize the RadPane hosting it or during load.

I'm pretty sure what we're trying to achieve will involve some code-behind effort. Could you please provide a sensible starting point?

Yoan
Telerik team
 answered on 25 Jan 2013
2 answers
248 views
I have a radMap that is bound to a collection of data items. I have defined an ItemTemplate that draws some WPF elements on the map, for each item in the collection.

What I want is to draw an push-pin image at the location of the item, and to have, offset a bit, a info bubble - a visible element containing information about the item.

Currently, my template consists of a grid with one cell, and with two items drawn in that cell - an Image, with its source pointing to the Uri for the image file, and a Border, with borders and corner radius set to create the bubble look, and with content elements that display what I need, that I am shifting up and right using <Border.RenderTransform><TranslateTransform>.

The problem - the point of the image is not set to the proper location on the map.  The HotSpot property is being applied to the entire Grid, and not to just the Image.

With the Translate, I'm binding X to half the sum of the ActualHeights of the Border and the Image, and ditto Y using the ActualWidths, using a scaling converter I've written. But translating the Border doesn't change the size of the containing Grid.

And here's the thing - I can't just figure out appropriate HotSpot offsets, because the actual size of the Border bubble is dynamic, changing with its contents.

I think I could, with some work, develop another converter that would return the appropriate HotSpot values, using a multiple binding to the image and the border. But I'm wondering if I'm not missing something simple.

Is there not a way to draw an element in association with my Image, without affecting the layout of the container within which that Image is contained?  Normally, I'd be looking at Adorners, but AIUI they can only be applied in code, and I see no way to hook them to the Images, as they're being drawn on the map.

Is there some simpler way of adding an info button to a push-pin?

<telerik:RadMap>
    <telerik:RadMap.Resources>
        <DataTemplate x:Key="pointTemplate">
            <Grid
                    telerik:MapLayer.Location="{Binding location}"
                    telerik:MapLayer.HotSpot="{Binding imageHotSpot}"
                    Margin="0"
                    >
                <Image
                        x:Name="pointImage"
                        Source="{Binding imageUri}"
                        MouseLeftButtonDown="selectMapPoint"
                        Height="24"
                        Width="24"
                        Margin="0"
                        />
 
                <!-- We shift the bubble over a bit by half the size of the image -->
                <Border Margin="0">
                    <Border.RenderTransform>
                        <TranslateTransform
                                X="{Binding ElementName=pointImage, Path=ActualWidth, Converter={StaticResource scalingConverter}, ConverterParameter=0.5}"
                                Y="{Binding ElementName=pointImage, Path=ActualHeight, Converter={StaticResource scalingConverter}, ConverterParameter=-0.5}"
                                />
                    </Border.RenderTransform>
                    <!-- And then by half the size of the bubble -->
                    <Border
                            x:Name="bubbleBorder"
                            BorderBrush="Black"
                            BorderThickness="2"
                            CornerRadius="4"
                            Background="White"
                            Padding="2"
                            Margin="0"
                            MouseLeftButtonDown="selectBubble"
                            >
                        <Border.RenderTransform>
                            <TranslateTransform
                                    X="{Binding ElementName=bubbleBorder, Path=ActualWidth, Converter={StaticResource scalingConverter}, ConverterParameter=0.5}"
                                    Y="{Binding ElementName=bubbleBorder, Path=ActualHeight, Converter={StaticResource scalingConverter}, ConverterParameter=-0.5}"
                                    />
                        </Border.RenderTransform>
                        <Label Content="{Binding ticketVM.jobRec.jobid}" />
                    </Border>
                </Border>
 
            </Grid>
        </DataTemplate>
    </telerik:RadMap.Resources>
 
    <telerik:InformationLayer
            x:Name="informationLayer"
            ItemsSource="{Binding mapElements}"
            ItemTemplate="{StaticResource pointTemplate}"
            />
 
</telerik:RadMap>
Jeff
Top achievements
Rank 1
 answered on 25 Jan 2013
1 answer
154 views
in demo, set inputMode to DatePicker, it will show date only, but when binding DateTimeText to a c# DateTime value , the inputmode will auto change to DateTimePicker. I think it is a bug.

Georgi
Telerik team
 answered on 25 Jan 2013
1 answer
185 views
How to bind to calendar's DisplayDateChanged event?
 or How to refresh blackout dates when change display from January to February? 

When I don't use telerik, I found a solution according to set the DatePicker.CalendarStyle, and rewrite the Calendar'sTemplate. In the Template, a new calendar is created, and so the new calendar's DisplayDateChanged event can be gained. But when using telerik radDateTimePicker, it will cause error.

<telerik:RadDateTimePicker>
            <telerik:RadDateTimePicker.CalendarStyle>
                <Style TargetType="telerik:RadCalendar">
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate>

                                <telerik:RadCalendar >
                                    <inter:Interaction.Triggers>
                                        <inter:EventTrigger EventName="DisplayDateChanged">
                                            <galaSoftMvvmLightCommand:EventToCommand PassEventArgsToCommand="True" Command="{Binding DisplayDateChangeCommand}" />
                                        </inter:EventTrigger>
                                    </inter:Interaction.Triggers>
                                </telerik:RadCalendar>

                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </telerik:RadDateTimePicker.CalendarStyle>
        </telerik:RadDateTimePicker>

NullReferenceException:
Object reference not set to an instance of an object.

   at Telerik.Windows.Controls.RadCalendar.UpdateRowsAndColumns() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Input\Calendar\RadCalendar.cs:line 3729
   at Telerik.Windows.Controls.RadCalendar.OnApplyTemplate() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Input\Calendar\RadCalendar.cs:line 2062
   at System.Windows.FrameworkElement.ApplyTemplate()
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Decorator.MeasureOverride(Size constraint)
   at System.Windows.Documents.AdornerDecorator.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Decorator.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Primitives.PopupRoot.MeasureOverride(Size constraint) 
Vladi
Telerik team
 answered on 25 Jan 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?