Telerik Forums
UI for WPF Forum
1 answer
225 views
Hi,

I have a grid that i declare in xaml but i want to define the child columns of the hierarchy (not autogenarated).

How can you do that?

My code:
Defining the child relation  
GridViewTableDefinition detailDefinition = new GridViewTableDefinition();  
detailDefinition.Relation = new PropertyRelation("QueueItemActions");  
radGridResubmit.TableDefinition.ChildTableDefinitions.Add(detailDefinition);  
 
 
Grid declaration  
       <Telerik:RadGridView HorizontalAlignment="Stretch" Width="Auto" Grid.Column="0" Grid.ColumnSpan="3" x:Name="radGridResubmit" AutoGenerateColumns="False">  
                <Telerik:RadGridView.Columns> 
                    <Telerik:GridViewDataColumn DataType="{x:Null}" HeaderText="" UniqueName="IsSelectedForResubmit" > 
                        <Telerik:GridViewColumn.CellStyle> 
                            <Style TargetType="{x:Type Telerik:GridViewCell}">  
                                <Setter Property="Template" Value="{StaticResource CheckBoxColumnTemplate}"/>  
                            </Style> 
                        </Telerik:GridViewColumn.CellStyle> 
                    </Telerik:GridViewDataColumn> 
                    <Telerik:GridViewDataColumn DataType="{x:Null}" HeaderText="JobId" UniqueName="JobId" /> 
                    <Telerik:GridViewDataColumn DataType="{x:Null}" HeaderText="ConfiguredBy" UniqueName="ConfiguredBy" /> 
                    <Telerik:GridViewDataColumn DataType="{x:Null}" HeaderText="BuildLocal" UniqueName="BuildLocal" /> 
                    <Telerik:GridViewDataColumn DataType="{x:Null}" HeaderText="Copies" UniqueName="Copies" /> 
                    <Telerik:GridViewDataColumn DataType="{x:Null}" HeaderText="ParentId" UniqueName="ParentId" /> 
                    <Telerik:GridViewDataColumn DataType="{x:Null}" HeaderText="StatusId" UniqueName="Status.Description" /> 
                    <Telerik:GridViewDataColumn DataType="{x:Null}" HeaderText="QueueItemId" UniqueName="QueueItemId" /> 
                    <Telerik:GridViewDataColumn DataType="{x:Null}" HeaderText="ImportId" UniqueName="ImportId" /> 
                    <Telerik:GridViewDataColumn DataType="{x:Null}" HeaderText="QueueDescription" UniqueName="Queue.Description" /> 
                    <Telerik:GridViewDataColumn DataType="{x:Null}" HeaderText="QueueEnvironment" UniqueName="Environment" /> 
                    <Telerik:GridViewDataColumn DataType="{x:Null}" HeaderText="PrinterTray" UniqueName="PrinterTray.Description" /> 
                    <Telerik:GridViewDataColumn DataType="{x:Null}" HeaderText="Printer" UniqueName="PrinterTray.Printer.Name" /> 
                    <Telerik:GridViewDataColumn DataType="{x:Null}" HeaderText="ReportService" UniqueName="PrinterTray.Printer.ReportService.Name" /> 
                </Telerik:RadGridView.Columns> 
                  
            </Telerik:RadGridView> 

Regards
Hristo Deshev
Telerik team
 answered on 02 Jul 2008
1 answer
94 views
Hi,

Is there a way to know when there's an other record selected?

Because i can't find an event like SelectedIndexChanged.

regards
Milan
Telerik team
 answered on 30 Jun 2008
8 answers
973 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
175 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
130 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
79 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
86 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
104 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
327 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
121 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
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
Expander
Slider
TileList
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?