Telerik Forums
UI for WPF Forum
1 answer
100 views
I have a number of databound comboboxes in a rad pane that load fine.

I have an issue that when I try and pin the pane all the comboboxes reset and I get

System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey='comboItems'

a number of times.

Where combo items is defined as

<DataTemplate x:Key="DrillComboTemplate" >
                    <ComboBox SelectedValue="{Binding Value}" Width="{Binding Width}" HorizontalContentAlignment="{Binding Alignment}" ItemsSource="{DynamicResource comboItems}" />
                </DataTemplate>

Thanks

Andy
Vladi
Telerik team
 answered on 05 Apr 2013
2 answers
330 views

Hi!

We are using RadTileView control and would like to achieve the attached layout.
We removed the headers from the tiles and would like to have the window resizable (not fixed width tiles in restored form).
The problem is that tile number 3 is either next to tile 2 or in the beginning of the last row.
The XAML is below:

<Window x:Class="WpfApplication2.MainWindow"
        xmlns:Telerik_Windows_Controls_TileView="clr-namespace:Telerik.Windows.Controls.TileView;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:System="clr-namespace:System;assembly=mscorlib"
        Title="MainWindow"
        Width="1164"
        Height="900">
    <Window.Resources>
        <Style x:Key="RadTileViewItemStyle" TargetType="{x:Type telerik:RadTileViewItem}">
            <Setter Property="HorizontalContentAlignment" Value="Stretch" />
            <Setter Property="VerticalContentAlignment" Value="Stretch" />
            <Setter Property="SnapsToDevicePixels" Value="True" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type telerik:RadTileViewItem}">
                        <Grid>
                            <Border x:Name="outerBorder"
                                    Margin="{TemplateBinding Padding}"
                                    Background="{TemplateBinding Background}"
                                    BorderBrush="{TemplateBinding BorderBrush}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    CornerRadius="7">
                                <Border x:Name="outerContainer"
                                        Background="Transparent">
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition Height="*" />
                                        </Grid.RowDefinitions>
                                        <Grid Grid.Row="1" Background="Transparent">
                                            <Border >
                                                <Grid MinHeight="28">
                                                    <Border x:Name="GripBarElement" Background="Transparent" >
                                                        <ContentPresenter x:Name="ContentElement"
                                                                
                                                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                              Content="{TemplateBinding Content}"
                                                              ContentTemplate="{TemplateBinding ContentTemplate}" />
                                                    </Border>
                                                </Grid>
                                            </Border>
  
                                        </Grid>
                                        <Rectangle x:Name="DisabledVisual"
                                                   Grid.RowSpan="2"
                                                   Visibility="Collapsed" />
                                    </Grid>
                                </Border>
                            </Border>
                            <Grid x:Name="SelectedItem"
                                  Margin="-1"
                                  Visibility="Collapsed">
                                <Border Margin="{TemplateBinding Padding}"/>
                            </Grid>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsSelected" Value="True">
                                <Setter TargetName="SelectedItem" Property="Visibility" Value="Visible" />
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>
    <Grid Background="#212121">
          
        <Grid Margin="137 250 137 205">
            <Border BorderThickness="5" Background="#016330" BorderBrush="#016330" CornerRadius="7">
                <telerik:RadTileView 
                    MaximizeMode="ZeroOrOne" 
                    RowHeight="Auto" 
                    ColumnWidth="Auto" 
                    IsItemsSizeInPercentages="True"
                    PreservePositionWhenMaximized="True" 
                    MinimizedColumnWidth="120"
                    MinimizedItemsPosition="Right"
                    IsItemDraggingEnabled="True"
                    TileStateChangeTrigger="SingleClick"
                    Padding="0"
                    telerik:TileViewPanel.IsColumnsShrinkEnabled="True"
                    telerik:TileViewPanel.IsRowsShrinkEnabled="True"
  
                    >
                    <telerik:RadTileViewItem 
                                     Header="Item 1"
                                     Padding="5"
                                     RestoredWidth="66"
                                     RestoredHeight="66"                        
                                     Style="{DynamicResource RadTileViewItemStyle}" Background="Green">
                    </telerik:RadTileViewItem>
  
  
                    <telerik:RadTileViewItem Header="Item 2"
                                     Background="Red"
                                     Padding="5"
                                     RestoredWidth="33"
                                     RestoredHeight="33"
                                     Style="{DynamicResource RadTileViewItemStyle}" >
                          
                    </telerik:RadTileViewItem>
  
                    <telerik:RadTileViewItem Background="Blue"
                                     Header="Item 3"
                                     Padding="5"
                                     RestoredWidth="33"
                                     RestoredHeight="33"
                                     Style="{DynamicResource RadTileViewItemStyle}" />
                      
                    <telerik:RadTileViewItem Background="Pink"
                                     Header="Item 4"
                                     Padding="5"
                                     RestoredWidth="16"
                                     RestoredHeight="33"
                                     Style="{DynamicResource RadTileViewItemStyle}" />
                        <telerik:RadTileViewItem Background="Orange"
                                     Header="Item 5"
                                     Padding="5"
                                     RestoredWidth="16"
                                     RestoredHeight="33"
                                     Style="{DynamicResource RadTileViewItemStyle}" />
                      
                            <telerik:RadTileViewItem Background="Yellow"
                                     Header="Item 6"
                                     Padding="5"
                                     RestoredWidth="16"
                                     RestoredHeight="33"
                                     Style="{DynamicResource RadTileViewItemStyle}" />
                    <telerik:RadTileViewItem Background="Lime"
                                     Header="Item 7"
                                     Padding="5"
                                     RestoredWidth="33"
                                     RestoredHeight="33"
                                     Style="{DynamicResource RadTileViewItemStyle}" />
                </telerik:RadTileView>
            </Border>
        </Grid>
    </Grid>
</Window>
Thank you!
Krisztian
Top achievements
Rank 1
 answered on 05 Apr 2013
5 answers
869 views
I have a RadGridView where the ItemsSource is a DataTable. The user is able to run a query which returns a List of objects which I convert to a DataTable using a WPF Converter .. All the binding is done through XAML.. Everything works very well so far. If the user reruns the query RadGridView gets correctly updated as expected.

Now the problem is when I add grouping. Rerun the query and now the grid is empty. However if I remove the grouping, all the expected data is displayed on the grid and now if I regroup everything works fine until the ItemsSource on the grid is changed again (by re-running the query). Any idea why this is happening?

I tried removing the GroupingDescriptors and re-adding them .. Also tried rebinding when the ItemsSource changed .. both options did not work. What am I missing here?

Thanks.
Dimitrina
Telerik team
 answered on 05 Apr 2013
2 answers
108 views
Hi All,

How do setting Document offset?I am using

myPdfViewer.VerticalScrollBar.Value=100; Only Thumb bar moving,Document isnt moving.Do we have somesing like " myScrollViewer.ScrollToVerticalOffset(100);"?

Thanks.

 

 

 

 

 

 

 

 

Wenjie
Top achievements
Rank 1
 answered on 04 Apr 2013
5 answers
309 views
Hi!

I am trying to customize a DateTimePicker to show the whole date and time in a custom format.
I found a way to customize the ShortdatePattern and the shorttimePattern separatly, but I would really require the FullDateTimePattern to work, as I have the format in a string (date and time combined) and I don't want to split it. I am using Q12013 WFP RadDateTimePicker

            dtp.SelectedValue = DateTime.Now;
            dtp.Culture = new CultureInfo("")
                              {
                                  DateTimeFormat =
                                      {
                                          FullDateTimePattern = "yyyy : MM : dd HH mm ss", //doesn't work
                                          ShortDatePattern = "yyyy : MM : dd", //works
                                          ShortTimePattern = "tt hh::mm::ss", //works
                                      },
                              };

Thanks in advance,
Alex
Alek
Telerik team
 answered on 04 Apr 2013
2 answers
145 views
My users have been getting intermittent exceptions in the grids where we are scolling down to the new records after an add.  I am attaching the error message.  I added the try/catch to the sync to try to stop the unhandled exception error but it didn't seem to work because another user had an error after this code went out.

We are using version 2012.3.1129.40 (can't upgrade to 2013.1.220 for a few more weeks as this is our busy season).

Here is a sample of the code in one of the gridviews (used similar logic in the other grids):
private void grdCash_RowEditEnded(object sender, GridViewRowEditEndedEventArgs e)
        {
            this.grdCash.KeyboardCommandProvider = new DefaultKeyboardCommandProvider(this.grdCash);
 
            if (e.EditAction == GridViewEditAction.Cancel)
            {
                return;
            }
            else
            {
                //Update the entry in the view model
                if (DataContext is BatchCashViewModel)
                {
                    _batchCashViewModel.UpdateBatchCashRecordCommand.Execute(e.NewData);
 
                    if (e.Row is GridViewNewRow)
                    {
                        try
                        {
                            this.grdCash.ScrollIntoViewAsync(this.grdCash.Items[this.grdCash.Items.Count - 1], //the row
                             this.grdCash.Columns[1], //the column
                             new Action<FrameworkElement>((f) =>
                             {
                                 (f as GridViewRow).IsSelected = true; // the callback method
                             }));
                        }
                        catch (Exception ex)
                        { }
                    }
                }
            }
        }

Dimitrina
Telerik team
 answered on 04 Apr 2013
1 answer
119 views
Hi,

I created ColumnGroups for my GridView Columns and found out that Grid lines for ColumnGroup and Columns are not lining up and doesn't look good in UI. Is there any workaround for this? I am attaching a

1) magnified snapshot to illustrate the difference in lines (gridheaderwithcolumngroup_snapshot.png)

I have a sample project as well to show this but couldn't upload it because I am not allowed to attach anything else to this thread apart from image files.

Thanks,
Sandeep
Yoan
Telerik team
 answered on 04 Apr 2013
3 answers
249 views
Hi Guys,

I am very interested with Data virtualization, so I am refractoring my customer's old WPF project. Everything goes well but I encountered one critical issue when I use combobox with VirtualQueryableCollectionView  as GridViewDataColumn.CellEditTemplate.  Let me show it:

1. I make below collection binding to my combobox
private VirtualQueryableCollectionView _dataSource;
public VirtualQueryableCollectionView DataSource
{
    get
    {
        if (_dataSource == null)
        {
            _dataSource = new VirtualQueryableCollectionView(Manager.GetAll().AsQueryable()
                .OrderBy(ExpressionHelper.CreateOrderByExpression<T>(DisplayName)))
            {
                LoadSize = 20,
                VirtualItemCount = _manager.GetCount(),
            };
            //_dataSource.ItemsLoading += ItemsLoading;
            //_dataSource.ItemsLoaded += ItemsLoaded;
        }
        return _dataSource;
    }
    set
    {
        if (Equals(_dataSource, value)) return;
        _dataSource = value;
        OnPropertyChanged("DataSource");
    }
}
2. I used GridViewDataColumn.CellEditTemplate with below 
<telerik:GridViewDataColumn Header="{common:Translate RetailChain}"
                                           x:Name="Test"
                                           DataMemberBinding="{Binding BuyingOrganization.BO_CompanyName}">
                   <telerik:GridViewDataColumn.CellEditTemplate>
                       <DataTemplate>
                           <telerik:RadComboBox ToolTip="{common:Translate RetailChain_TT}"
                                                SelectedValue="{Binding BuyingOrganization}"
                                                ItemsSource="{Binding Source={StaticResource GlobalDataManager},Path= BuyingOrganizations.DataSource}"
                                                DisplayMemberPath="{Binding Source={StaticResource GlobalDataManager},Path= BuyingOrganizations.DisplayName}" />
                       </DataTemplate>
                   </telerik:GridViewDataColumn.CellEditTemplate>
               </telerik:GridViewDataColumn>

3. when I change inner combobox's selection, my viewmodel BuyingOrganization can be changed. From surface,
 it work right.   But 
if I take this cell out of Edit mode, the Null will be set to this BuyingOrganization. 

I debug it, the VirtualQueryableCollectionView will call MoveCurrentPosition to one null value.

How should I do? Can you give me some tips?

Thanks & Regards

Dely
Dimitrina
Telerik team
 answered on 04 Apr 2013
1 answer
78 views
I have pdf file preview.pdf and it cannot be displayed in viewer. I use controls 2013 Q1

UPDATE: it works in 2013 Q1 SP1
Kammen
Telerik team
 answered on 04 Apr 2013
3 answers
179 views
I've got a GridView control on a window, that has some columns in it. One of the columns is wider than we need it to be. The values in that column are nearly always single digits. (There's only 4 records out of tens of thousands, in our database, which is either 10 or 11, and 11 is the highest any of our records go.) Anyway, in looking at the properties of the GridViewDataColumn I was that the MinWidth was 20. I set it to 3, but that didn't help. In fact, it didn't even look as though I'd changed the width at all. So, how do I get it to be narrower than it currently is displayed at? (The column I'm trying to narrow is the one associated with the CaseNumber data.) Here's the XAML:

<telerik:RadGridView VerticalAlignment="Stretch" AutoGenerateColumns="False" DataMember="ClientNumber"
                     x:Name="grdClients" d:DataContext="{d:DesignData Source=/SampleData/ASISelectClientSampleCollection.xaml}"
                     IsReadOnly="True" ShowColumnHeaders="False" ShowGroupPanel="False"
                     RowIndicatorVisibility="Collapsed"
                     IsFilteringAllowed="False" AutoExpandGroups="True" FontSize="16" SelectionChanged="grdClients_SelectionChanged"
                     ItemsSource="{Binding}" HorizontalAlignment="Left" MouseDoubleClick="grdClients_MouseDoubleClick"
                     >
  <telerik:RadGridView.Columns>
    <telerik:GridViewDataColumn UniqueName="ClientNumber">
      <telerik:GridViewColumn.ToolTipTemplate>
        <DataTemplate>
          <TextBlock Text="Client Number" />
        </DataTemplate>
      </telerik:GridViewColumn.ToolTipTemplate>
    </telerik:GridViewDataColumn>
    <telerik:GridViewDataColumn UniqueName="LastName">
      <telerik:GridViewColumn.ToolTipTemplate>
        <DataTemplate>
          <TextBlock Text="Last Name" />
        </DataTemplate>
      </telerik:GridViewColumn.ToolTipTemplate>
    </telerik:GridViewDataColumn>
    <telerik:GridViewDataColumn UniqueName="FirstNames">
      <telerik:GridViewColumn.ToolTipTemplate>
        <DataTemplate>
          <TextBlock Text="First Name" />
        </DataTemplate>
      </telerik:GridViewColumn.ToolTipTemplate>
    </telerik:GridViewDataColumn>
    <telerik:GridViewDataColumn UniqueName="CaseNumber">
      <telerik:GridViewColumn.ToolTipTemplate>
        <DataTemplate>
          <TextBlock Text="Case Number" />
        </DataTemplate>
      </telerik:GridViewColumn.ToolTipTemplate>
    </telerik:GridViewDataColumn>
    <telerik:GridViewDataColumn UniqueName="DateOfBirth" DataFormatString="{}{0:d}">
      <telerik:GridViewColumn.ToolTipTemplate>
        <DataTemplate>
          <TextBlock Text="DOB" />
        </DataTemplate>
      </telerik:GridViewColumn.ToolTipTemplate>
    </telerik:GridViewDataColumn>
    <telerik:GridViewDataColumn UniqueName="InterviewDate" DataFormatString="{}{0:d}">
      <telerik:GridViewColumn.ToolTipTemplate>
        <DataTemplate>
          <TextBlock Text="Interview Date" />
        </DataTemplate>
      </telerik:GridViewColumn.ToolTipTemplate>
    </telerik:GridViewDataColumn>
  </telerik:RadGridView.Columns>
  <telerik:RadGridView.SortDescriptors>
    <telerik:SortDescriptor Member="LastName" SortDirection="Ascending" />
    <telerik:SortDescriptor Member="FirstNames" SortDirection="Ascending" />
    <telerik:SortDescriptor Member="CaseNumber" SortDirection="Descending" />
  </telerik:RadGridView.SortDescriptors>
  <telerik:RadGridView.GroupDescriptors>
    <telerik:GroupDescriptor Member="ClientNumber">
    </telerik:GroupDescriptor>
  </telerik:RadGridView.GroupDescriptors>
  <telerik:RadGridView.GroupHeaderTemplate>
    <DataTemplate>
      <StackPanel Orientation="Horizontal">
        <StackPanel Orientation="Horizontal" MinWidth="180">
          <TextBlock Text="{Binding Group.Items[0].LastName}" />
          <TextBlock Text=", " />
          <TextBlock Text="{Binding Group.Items[0].FirstNames}" />
        </StackPanel>
        <StackPanel Orientation="Horizontal">
          <TextBlock Text="{Binding Group.Items[0].SocialSecurityNo}" FontWeight="Bold"  />
        </StackPanel>
      </StackPanel>
    </DataTemplate>
  </telerik:RadGridView.GroupHeaderTemplate>
</telerik:RadGridView>



Dimitrina
Telerik team
 answered on 04 Apr 2013
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
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?