Telerik Forums
UI for WPF Forum
4 answers
297 views
Is there a way the RadDatePicker show the Calendar all the time?
So we do not need to use toggle button to show calendar.
thx!
Jane 
Pana
Telerik team
 answered on 20 Jan 2010
1 answer
209 views
Hello

In the new release (2009.3.1314.35) setting the default theme to Vista 

StyleManager.ApplicationTheme = new VistaTheme(); 

I am getting the following error when the window loads.

System.NullReferenceException was unhandled by user code 
  Message="Object reference not set to an instance of an object." 
  Source="PresentationFramework" 
  StackTrace: 
       at System.Windows.StyleHelper.UpdateTables(PropertyValue& propertyValue, FrugalStructList`1& childRecordFromChildIndex, FrugalStructList`1& triggerSourceRecordFromChildIndex, FrugalStructList`1& resourceDependents, HybridDictionary& dataTriggerRecordFromBinding, HybridDictionary childIndexFromChildName, Boolean& hasInstanceValues) 
       at System.Windows.StyleHelper.ProcessTemplateContent(FrameworkTemplate frameworkTemplate, FrugalStructList`1& childRecordFromChildIndex, FrugalStructList`1& triggerSourceRecordFromChildIndex, FrugalStructList`1& resourceDependents, ItemStructList`1& eventDependents, HybridDictionary& dataTriggerRecordFromBinding, HybridDictionary childIndexFromChildID, Boolean& hasInstanceValues) 
       at System.Windows.StyleHelper.SealTemplate(FrameworkTemplate frameworkTemplate, Boolean& isSealed, FrameworkElementFactory templateRoot, TriggerCollection triggers, ResourceDictionary resources, HybridDictionary childIndexFromChildID, FrugalStructList`1& childRecordFromChildIndex, FrugalStructList`1& triggerSourceRecordFromChildIndex, FrugalStructList`1& containerDependents, FrugalStructList`1& resourceDependents, ItemStructList`1& eventDependents, HybridDictionary& triggerActions, HybridDictionary& dataTriggerRecordFromBinding, Boolean& hasInstanceValues, EventHandlersStore& eventHandlersStore) 
       at System.Windows.FrameworkTemplate.Seal() 
       at System.Windows.StyleHelper.SealIfSealable(Object value) 
       at System.Windows.ResourceDictionary.RealizeDeferContent(Object key, Object& value, Boolean& canCache) 
       at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache) 
       at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache) 
       at System.Windows.DeferredThemeResourceReference.GetValue(BaseValueSourceInternal valueSource) 
       at System.Windows.DependencyPropertyChangedEventArgs.get_NewValue() 
       at Telerik.Windows.Controls.RadTabControl.OnLeftTemplateChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\TabControl\RadTabControl.cs:line 2371 
       at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e) 
       at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e) 
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args) 
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType) 
       at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp) 
       at System.Windows.StyleHelper.InvalidateContainerDependents(DependencyObject container, FrugalStructList`1& exclusionContainerDependents, FrugalStructList`1& oldContainerDependents, FrugalStructList`1& newContainerDependents) 
       at System.Windows.StyleHelper.DoThemeStyleInvalidations(FrameworkElement fe, FrameworkContentElement fce, Style oldThemeStyle, Style newThemeStyle, Style style) 
       at System.Windows.StyleHelper.UpdateThemeStyleCache(FrameworkElement fe, FrameworkContentElement fce, Style oldThemeStyle, Style newThemeStyle, Style& themeStyleCache) 
       at System.Windows.FrameworkElement.OnThemeStyleChanged(DependencyObject d, Object oldValue, Object newValue) 
       at System.Windows.StyleHelper.GetThemeStyle(FrameworkElement fe, FrameworkContentElement fce) 
       at System.Windows.FrameworkElement.UpdateThemeStyleProperty() 
       at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e) 
       at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e) 
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args) 
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType) 
       at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal) 
       at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value) 
       at System.Windows.FrameworkElement.set_DefaultStyleKey(Object value) 
       at Telerik.Windows.Controls.RadTabControl.SetDefaultStyleKey() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\TabControl\RadTabControl.cs:line 1336 
       at Telerik.Windows.Controls.RadTabControl.OnInitialized(EventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\TabControl\RadTabControl.cs:line 1346 
       at System.Windows.Markup.BamlRecordReader.ElementEndInit(Object& element) 
  InnerException:  
 

All the other themes are working properly, only the Vista theme is not working.
I can supply the xaml taht I'm using if necessary, but I'm not doing any styling at all, just taking the stylemanager's theme.


Joshua
Dimitrina
Telerik team
 answered on 20 Jan 2010
1 answer
109 views
Hi
        I am using TileView Control. Everything is working fine with one issue that TileView control doesnot display anything without Height property, i have to define height static even when Height="Auto" still doesnot display anything I doesnot want static height, It should be auto How?
Tihomir Petkov
Telerik team
 answered on 20 Jan 2010
5 answers
121 views
What can be the problem when I´m trying to insert a new item and the insert focus is never in the first column?
Nedyalko Nikolov
Telerik team
 answered on 20 Jan 2010
1 answer
136 views
Hi to all,
i just would like to drag a RadTreeViewItem on a different component without make it selected.
Right now i have tried different ways without success...

I have implemented the PreviewMouseLeftButtonDown handler when the item is prepared, so when the user just press down the mouse i store the treeviewitem and put the e.Handled = true just to leave it unselected. When the event PreviewMouseLeftButtonUp is fired i will get the stored element and make it selected (so no drag operation...just a normal click on the element).

The big problem is that the
e.PreparedItem.PreviewMouseLeftButtonDown += new MouseButtonEventHandler(PreparedItem_PreviewMouseLeftButtonDown);

is sent different times..the first time the source is the "root" element of the RadTreeView the second time the first child of the root element and so on. I think it is not correct to fire so many events if i mouse down only on one RadTreeViewItem...i aspect to have directly on the first event the right treeviewitem on the source!

Do you have any idea how to implement this scenario?

Really Thanks.
Diego Bonura




Miroslav
Telerik team
 answered on 20 Jan 2010
3 answers
180 views
I'm having issues with AlternatingRowStyle not being applied as expected when adding or removing items to the underlying ObservableCollection to which the grid is bound via the ItemsSource property.

The grid is sorted such that the newly added items are always at the top and the AlternationCount is set to 2.

When adding a second item, the rows display as expected, but when a third item is added, all rows display with the default style. Removing an item from the list does not cause the other rows to adjust based on their new position.

If I Commit an Edit to a cell in the grid, all rows in the grid will update their style and display as expected.

What could cause this kind of behaviour and how do I fix it?
Vlad
Telerik team
 answered on 20 Jan 2010
2 answers
193 views
I just got new direction orders from our CIO.  He wants to shift from ASP.net application to a smart client application.  I have read about the The Telerik CAB Enabling Kit.  Does Telerik have a whitepaper or example code that demonstrates best practices for OpenAccess, RIA Dataservices/ Web Services and WPF?   I am trying to decide on the approach to take with smart client.  I would like any suggestions as to the best way to implement such an application.

Thanks,
Bryan
Robert
Top achievements
Rank 1
 answered on 19 Jan 2010
3 answers
130 views
i want to use checkboxes instead of ctrl+click to select multiple rows in the radGridView. I use this.radGridView.SelectedItems in my functions but i don't know how to use the SelectedItems list with the checkboxes. I would greatly appreciate an example of use.. Sorry for my newbie question, and thank you for the help.
Pavel Pavlov
Telerik team
 answered on 19 Jan 2010
3 answers
386 views
Hello,
    There's probably an easier way to add a column to the grid dynamically but it gave me , a newbie, a lot of grief.

Adding a column dynamically to a grid that's associated with a datatable turned out to be relatively easy:

// Create the datatable column
newColumn = new DataColumn();
newColumn.ColumnName = <column name>;
newColumn.DataType = ..
....
<Datatable name>.Columns.Add(newColumn);
<Dataset name>.Tables[0].Columns[<column name>].SetOrdinal(<Position of the new column within the datatable>);

// Break and re-establish the link between the grid and the datatable.
<Grid name>.ItemsSource = null;
<Grid name>.ItemsSource = <Datatable name>;

// Load the new column with data by adding the data to the datatable
<datatable name>.Rows[<row index>][column index] = <data>;
<grid name>.Rebind;




Jorge Gonzalez
Top achievements
Rank 1
 answered on 19 Jan 2010
5 answers
218 views
Hello!
If I have a RadComboBox, with  more than 20 items this thing becomes a bit confusing.
My example:

Window1.xaml.cs:

public partial class Window1 : Window {
public Window1() {
            InitializeComponent();
            InitializeCombobox();
        }
        private void InitializeCombobox() {
            cbPrimaryData.Items.Clear();
            IList<String> dataItems = new List<string>();

            for (int i = 0; i < 50; i++) {
                dataItems.Add( "Item " + i );
            }
            cbPrimaryData.DataContext = dataItems;
        }
}

in Window1.xaml:

<Grid>
        <telerik:RadComboBox Grid.Row="1"
                             Grid.Column="1"
                             Grid.ColumnSpan="2"
                             Height="20"
                             Name="cbPrimaryData"
                             VerticalAlignment="Center"
                             ItemsSource="{Binding}"
                             Margin="2" />
    </Grid>

If I select the item at index 0 everything works fine when I try to open again the combo box the focus is at the beginning of the items list.
If item at index 1 is selected - at the nest attempt to open the combo box the focus goes to Item 17!
index 2 => focus at index 34
Afterwords the focus is moved at the end of the list.
I think that normal and logic would be that the combo box is focused starting with the selected index, and not at the end of the list.
I don't know if I was very clear in the explanation... just try the small example :)

Regards,
RoxanaC
Valeri Hristov
Telerik team
 answered on 19 Jan 2010
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
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?