Telerik Forums
UI for WPF Forum
8 answers
871 views

I have used the following code to associate a table value to a button.  I would like to do a similar thing to with a textbox, but I keep getting a NullReferenceException.

<Telerik:GridViewCell Foreground="#FFFFFFFF" Width="80" ColumnName="submittal" TextBlock.FontSize="16" Margin="770,0,0,0" HorizontalAlignment="Left">
<Telerik:GridViewCell.Template>
<ControlTemplate>
<Button Click="Button_Click" Background="Transparent" Foreground="White" ClickMode="Press" Tag="{Binding Path=Content, RelativeSource={RelativeSource TemplatedParent}}" AllowDrop="True" >
<TextBlock Width="75" Text="Submittal" />
</Button>
</ControlTemplate>
</Telerik:GridViewCell.Template>
</Telerik:GridViewCell>
What is wrong with:

<

Telerik:GridViewCell Foreground="#FFFFFFFF" Width="80" ColumnName="submittal" TextBlock.FontSize="16" Margin="770,0,0,0" HorizontalAlignment="Left">
<Telerik:GridViewCell.Template>
<ControlTemplate>
<TextBox Text="{Binding Path=Content, RelativeSource={RelativeSource TemplatedParent}}" AllowDrop="True" >
</TextBox>
</ControlTemplate>
</Telerik:GridViewCell.Template>
</Telerik:GridViewCell>
 
?

Hristo Deshev
Telerik team
 answered on 30 Jun 2008
3 answers
140 views
Hello,

When your RadControls for WPF will be released, will it be released with source code?
Hristo Deshev
Telerik team
 answered on 26 Jun 2008
2 answers
97 views
Hi,

After restyling the grid view items control to take out the group panel I get an error when clicking on cells:

  
{System.ArgumentNullException: Value cannot be null
Parameter name: reference 
   at System.Windows.Media.VisualTreeHelper.GetDescendantBounds(Visual reference) 
   at Telerik.Windows.Controls.UI.DragDropManager.IsMouseOverTarget(Visual target, GetPositionDelegate getPosition) 
   at Telerik.Windows.Controls.UI.GridViewItemsControl.OnPreviewMouseUp(MouseButtonEventArgs e) 
   at System.Windows.UIElement.OnPreviewMouseUpThunk(Object sender, MouseButtonEventArgs e) 
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) 
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) 
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) 
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) 
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) 
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted) 
   at System.Windows.Input.InputManager.ProcessStagingArea() 
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) 
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) 


My control template is as follows:

 <ControlTemplate x:Key="GridViewItemsControlTableTemplate" TargetType="{x:Type UI:GridViewItemsControl}"
    <Grid Background="{TemplateBinding Background}"
        <Grid.Resources> 
                <UI:DoubleToGridLengthConverter x:Key="DoubleToGridLengthConverter" /> 
        </Grid.Resources> 
            <Grid.RowDefinitions> 
                <RowDefinition Height="Auto" /> 
                <RowDefinition /> 
                <RowDefinition x:Name="ScrollBarRow" MinHeight="10"  
                               Height="{Binding Source={StaticResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}},  
                    Converter={StaticResource DoubleToGridLengthConverter}}"/> 
            </Grid.RowDefinitions> 
            <Grid.ColumnDefinitions> 
                <ColumnDefinition /> 
                <ColumnDefinition x:Name="ScrollBarColumn" MinWidth="10" Width="{Binding Source={StaticResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}, Converter={StaticResource DoubleToGridLengthConverter}}"/> 
            </Grid.ColumnDefinitions> 
                         
            <UI:GridViewBackground x:Name="PART_GridViewBackground" Margin="10,0,0,0" Grid.Row="0"  
                                   Grid.ColumnSpan="1" Grid.RowSpan="2"  
                                   HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsHitTestVisible="False"/> 
 
            <StackPanel Grid.Row="0"
                <Border Margin="0,0,0,0" BorderThickness="0" ClipToBounds="True" 
                        Background="{StaticResource {x:Static Resources:FunctionalBrushes.EntityTabBackgroundBrushKey}}"
                    <UI:GridViewHeaderRow Name="PART_HeaderRow" VerticalAlignment="Top"/> 
                </Border> 
                <UI:GridViewNewRow Name="PART_AddNewRow" Margin="10,0,0,0"  
                                   VerticalAlignment="Bottom" HorizontalAlignment="Stretch"  
                                   Visibility="Collapsed" /> 
            </StackPanel> 
 
            <ScrollViewer Name="PART_ItemsScrollViewer" Focusable="False" VerticalScrollBarVisibility="Auto"  
                          HorizontalScrollBarVisibility="Auto"  
                          CanContentScroll="True" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2"
                <ItemsPresenter Margin="10, 0, 0, 0"/> 
            </ScrollViewer> 
        </Grid> 
        <ControlTemplate.Triggers>           
            <Trigger Property="ComputedVerticalScrollBarVisibility" SourceName="PART_ItemsScrollViewer" Value="Collapsed"
                <Setter Property="Width" TargetName="ScrollBarColumn" Value="10" /> 
            </Trigger> 
            <Trigger Property="ComputedHorizontalScrollBarVisibility" SourceName="PART_ItemsScrollViewer" Value="Collapsed"
                <Setter Property="Height" TargetName="ScrollBarRow" Value="10" /> 
            </Trigger> 
        </ControlTemplate.Triggers> 
    </ControlTemplate> 

Have I done something wrong or is this a bug?

Kind regards,

Will Holley

Will
Top achievements
Rank 1
 answered on 20 Jun 2008
2 answers
51 views
We have an issue with the column drag&drop mechanism.

This issue happens when you drag and drop a column and then change the data source.

After this, no columns are displayed in the grid. We are adding the column definitions ourselves (they are re-generated when the data source changes) and we know that it works when changing the data source without performing column drag / drop.

Is this a known issue?

Kind regards,

Will Holley.
Will
Top achievements
Rank 1
 answered on 12 Jun 2008
1 answer
70 views
We are using the RadGridView to present paged data and would like to intercept the Sort events and plug in our own mechanism to sort across the entire data set. Is there a straightfoward way to do this?

Another requirement is that we need to disable sorting on some columns - is this possible?

Kind regards,

Will Holley
Nedyalko Nikolov
Telerik team
 answered on 10 Jun 2008
1 answer
76 views
When the grid first loads and we have our column widths set to Auto, the column widths are correct. However, when we change the itemssource property to point to a different datasource (which loads it's data asyncronously), the widths do not update.

Is it possible to force the columns to re-evaluate their widths? Calling AutoFitColumns via reflection doesn't seem to work (!).

Kind regards,

Will Holley


Nedyalko Nikolov
Telerik team
 answered on 10 Jun 2008
2 answers
267 views
Hi,

We are just experimenting with the RadGridView in the WPF controls and have found that when we bind to an observable collection, CollectionChanged events cause the grid to throw an exception:

"This type of CollectionView does not support changes to its SourceCollection from a thread different from the Dispatcher thread."
   
   at System.Windows.Data.CollectionView.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   at Telerik.Windows.Controls.Core.Data.VirtualizingRecordCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Controls.Core.Data.VirtualizingRecordCollection.Reset()
   at Telerik.Windows.Controls.Core.Data.VirtualizingRecordCollection.set_RealRecords(IList`1 value)
   at Telerik.Windows.Controls.Core.Data.RecordManager.RecalculateGroups()
   at Telerik.Windows.Controls.Core.Data.RecordManager.ResetRecords()
   at Telerik.Windows.Controls.Core.Data.RecordManager.OnSourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Controls.Core.Data.RecordManager.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
   at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
   at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
   at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)

This looks to be a bug in the grid as we haven't experienced this with the other WPF grids we tried. Do you know of a work around?

Many thanks,

Will Holley
Nedyalko Nikolov
Telerik team
 answered on 10 Jun 2008
1 answer
94 views
how can i do, for use the carrusel without scroll controls , i need that with the mouse move it and can select items and when i click a front item can open a rad window, or this item show me another carrusel o reload the same with others items.

i am a subscribed user but in the client.net i dont see the support for wpf controls.

please response me it is urgent for me, i need this.

fcibreiro@harweb.net
Milan
Telerik team
 answered on 06 Jun 2008
2 answers
112 views
Been looking at the carousel components. There is one issue and one nice to have. These can be seen on the examples.

1. This one looks like a bug. When you move to the left, you get to the 'end' where you can't move left anymore but there are still images to the left. You just can't click on them. Same if you move to the right. If you displayed a distinct list of images that occur only once (as you would if you laoded them from a database), you can never click on those couple of items. They seem to be unusable. 

2. This one woul be a nice to have. If you move to the left, why should you come to a stop? Couldn't it just scroll back around to the right? So you end up with a circle of items that you can just keep moving through in one direction rather than a distinct list which has a start and end.
Milan
Telerik team
 answered on 06 Jun 2008
1 answer
117 views
Hello,
I just started to play around a bit with the new Telerik WPF Controls.

I use Blend 2.5 to design my window. I can drag and drop the RadCalendar on the window. When I change the theme for the RadCalendar, I get a "Object Reference not set to an instance of an object" error.
The xaml property on the RadCalendar looks like this: Telerik_Windows_Controls_UI:Theming.Theme="Vista"

Is there some dll missing ? I have references to Telerik.Windows.Controls.Core.dll, Telerik.Windows.Controls.UI.dll and Telerik.Windows.Controls.UI.Design.dll

Thanks for any suggestions,
Nicolas
Hristo
Telerik team
 answered on 05 Jun 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?