Telerik Forums
UI for WPF Forum
1 answer
136 views
Hello,

Most of your examples are showing how to use RadRichTextbox (and other controls) using code behind of the xaml.  I am writing application using MVVM pattern. 

In your example, in the code behind you are showing:

radRichTextBox.Document.MailMergeDataSource.ItemsSource = GetMyList()


I need to databind ItemsSource to my list which is in the ViewModel.

Thank you in advance

Petya
Telerik team
 answered on 12 Aug 2013
1 answer
243 views

Hi

When i double click on dates in radcalendar,the selected date should get added.But the date should not get added while double click on the header,navigation arrows and week days? when i click on the arrows to change month, if i do this to fast, the control fires a  "double click" event.

Is there any way to decide if i clicked a date or some other place on the control? 

Thanks & Regards
Kotteeswari

Vladi
Telerik team
 answered on 12 Aug 2013
1 answer
133 views
Hi,
Is there any way of adding panels and controls to a RadRichTextBoxStatusBar  or does this control is only used for Text features ?
I would like to add panels to display some stats...
Txs 
-Vince
Boby
Telerik team
 answered on 12 Aug 2013
1 answer
158 views
Hi,

I have a WPF solution, where i use treeListView. I populate the treeListView from database and it works ok.

The problem is that when user has opened several items on treeListView and then tries to get the data again from database. The already opened rows are collapsed. I tried to first go through the treeListView items with this code:

//First try to get all expanded items to my own list variant (to store ID of all expanded items)

List<ClsDataOfTreeListItem> Items = new List<ClsDataOfTreeListItem>() ;

foreach (Telerik.Windows.Controls.TreeListView.TreeListViewRow row in myTreeListView.ChildrenOfType<Telerik.Windows.Controls.TreeListView.TreeListViewRow>())

{

     if(row.IsExpanded==true)

     Items.Add( (ClsDataOfTreeListItem)row.Item);

}

//then i refresh data from the database
GetData() //this populates data with refreshed contents from DB

 

//after refresh, expand the same items again by collected information
//the problem is, that this time the foreach loop doe not find any rows

foreach (Telerik.Windows.Controls.TreeListView.TreeListViewRow row in   
         myTreeListView.ChildrenOfType<Telerik.Windows.Controls.TreeListView.
TreeListViewRow>())

{

    foreach (ClsDataOfTreeListItem itm in Items)

    {

         ClsDataOfTreeListItem tmpItem = (ClsDataOfTreeListItem)row.DataContext;

         if (itm.ID == tmpItem.ID)

             row.IsExpanded = true;

    }

}

//after the operation, the UI is refreshed and the items not expanded, because the foreach loop did not find any rows after data refresh from db.

Why does the foreach loop detect any rows after data refresh? Is there any way to refresh the UI programmatically before trying to espand as it origanally was? Rebind after data refresh dide not help. Is there any "datarefreshed" event that I could use (the tmpItems could be stored and used in event handler if there is good one for this purpose)?

Is there any other ways to get and set the original expanded information (and the scrolled position if possible).?

 

 

Dimitrina
Telerik team
 answered on 12 Aug 2013
13 answers
1.2K+ views
Hi,

The Busy Indicator works great when you have background tasks going on. However, if you have a task that cannot be performed in the background such as updating a CollectionViewSource the animation stops.

The busy indicator should really be running in a seperate thread off the main GUI thread.

There is an example of this at http://abrahamheidebrecht.wordpress.com/2009/08/05/creating-a-busy-indicator-in-a-separate-thread-in-wpf/

Would Telerik consider updating the busy indicator to run on a seperate thread?

Thanks
Anthony
Luca
Top achievements
Rank 1
 answered on 12 Aug 2013
1 answer
171 views
Hi,

This is not 100% RadTileView/Item specific stuff but still would probably require different kind of implementation for RadTileViewItem templates...

I'm currently using headerTemplate like below as my RadTileView's ItemTemplate:

<DataTemplate x:Key="headerTemplate">
    <StackPanel Orientation="Horizontal">
        <telerik:RadButton Width="14"
                       Height="14"
                       Margin="0 0 0 0"
                       HorizontalAlignment="Center"
                       VerticalAlignment="Center"
                       Content="X"
                       FontSize="10"
                       Foreground="Black"
                       Background="White"
                       Command="{Binding Path=DataContext.RemoveTileCommand, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
                       CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=telerik:RadTileViewItem}}"
                       Padding="0"
                       />
        <TextBlock x:Name="TileHeader" FontSize="10" Text="{Binding Path=DataContext.DataContext.TileCaption, RelativeSource={RelativeSource AncestorType=telerik:RadTileViewItem}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left"/>
    </StackPanel>
</DataTemplate>

I have a problem localizing this TileHeader because TileCaption is a string property in each Tile's ViewModel and it gets a value like "Amount: 0" or "Not set" depending on the situation. So the localized part of the property should be "Amount: " or "Not set" or nothing in some cases.

I'm using 3rd party localization addon called WPF Localization extension and localization is done with binding like Text="lex:Loc SomeKey" so basically what I'm asking is how could I make Tile specific ItemTemplate so that I can use data binding to desired localized key or what would be the best way to accomplish binding to TileViewItem so that it will get the change notification and updates accordingly?

My current implementation lacks the functionality to refresh the title when RaisePropertyChanged is triggered (when language is changed) because I don't have data binding to TileCaption (I'm setting the value of TileCaption property in code).

So if I could somehow make tile specific ItemTemplate for each tile I could make binding in XAML. Of course this has other problem because I need to have 2 different localizations depending on the situation but at least the change notification would work.

Or should I create databindings in code-behind... 

Br,

Kalle
Pavel R. Pavlov
Telerik team
 answered on 12 Aug 2013
1 answer
184 views
Hi,
We are using the telerik RadGridView control (2012.3.1129.40) in our WPF application.
When the grid is populated with a lot of data, the scrolling is getting very slow, not smooth and stuck for few second till the view is updated.
Another problem is when performing the horizontal scrolling, the scroll bar indicator doesn't show the correct position regarding the row length and can jump back after the rendering of new columns
It really degrades the application convenience and users experience.

(We can't disable the row and columns virtualization and currently just set the ScrollMode="Deferred" to make it a little more friendly) 
Are there any solutions or grid configurations to improve the scrolling performance?
Thanks in advance. 
Yordanka
Telerik team
 answered on 12 Aug 2013
2 answers
38 views
Hi,

Pls suggest me the right way to achieve the below mentioned format schedule grid.


Regards,
Sugumar P
Sugumar
Top achievements
Rank 1
 answered on 12 Aug 2013
1 answer
109 views
I have setup a data source for editing in a RadGridView, the entity in question has a many to many relationship with another entity with in the database:

EntityA 
ID

EntityB
ID

EntiyAB
EntityAID
EntityBID

I want to load the related EntityB records in a row Details Template to enable the user to add, edit, and delete. I have set the RelatedObjects in the Entity Framework Data Source and have setup the RowDetailsTemplate with a radGridView, but yet the linked EntityB records are not being loaded nor is the child GridView allowing the user to add a new record.
tony
Top achievements
Rank 1
 answered on 11 Aug 2013
2 answers
248 views
Hi all,

I am using a RadGridView to display a list of DataRowBase objects which implements the ICustomTypeDescriptor. When the grid starts to populate its rows I observed some "first chance" ArgumentExceptions printed out in the output window of the IDE. ("An exception (first chance) of the type "System.ArgumentException" occurred in System.ComponentModel.DataAnnotations.dll" - translated from German).
As the grid showed all my data correctly, I could probably ignore the messages - but it was very slow in doing so. So I used a hard-coded class with the same data and the same grid and this was significantly faster (and didn't throw any exceptions). (I need to use a generic approach as the application allows the user to display data of csv files and I want to utilize all features of the grid view, like filtering, sorting, grouping etc.)

I took my while to find out how to track this exception message down to its root:
The original exception message is: "The type "DataRowBase" does not contain a public property "RefDate"." (translated from German, may not be accurate)
And it seems to be thrown by some code in "GridViewVirtualizingPanel.cs".

I can't see whether this exception is thrown by the above class or somewhere deeper in the .net framework (as the message in the output window suggests, see above). But it is interesting to see that the exception is thrown only once per row, not per row and column (as all my columns are generic).

This leads to the assumption that the interface ICustomTypeDescriptor is not used properly. I found a very helpful article on how this interface is used by System.ComponentModel.TypeDescriptor in an older issue of the MSDN Magazine: MSDN Magazine: ICustomTypeDescriptor, Part 1: "... Before going straight to the metadata to get property information, TypeDescriptor first checks to see if the type being examined implements the System.ComponentModel.ICustomTypeDescriptor interface. If it does, (...), rather than using the metadata to get property information, TypeDescriptor will simply ask the object (through its ICustomTypeDescriptor.GetProperties method) which properties it supports."

I added some Debug.WriteLine's to my ICustomTypeDescriptor.GetProperties() implementation and this revealed that
a) the above exception is thrown after a first call to GetProperties() of each(!) DataRowBase instance in my list, and
b) GetProperties() is called for every displayed column of the same instance (w/o exception) [why that? An initial call should be sufficient]

My question is here: Is this a problem of the RadGridView? Or does the problem lie deeper within the framework?

Any help/suggestion is highly appreciated!

Thanks,
Thorsten

PS
I am using RadControls for WPF, Q2 2013 and WPF 4.5
Thorsten
Top achievements
Rank 1
 answered on 09 Aug 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
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
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
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?