Hello, We're trying to implement a custom formatting bar for a radrichtextbox and are having some issues with a specific command.
We are tracking the state of the users selected text by adding eventhandlers to the different commands of the radrichtextbox and all is working well, except in one case: The ChangeListStyleCommand. For some reason it seems as if the "ListStyleChangedChanged"-event is not being called when a user selects a segment of text contained (partially or completely) in a list (including an attached image to show what I mean).
I might have a wrong understanding of how it's supposed to work, but the other commands seem to work in such fashion.
Relevant C# Code:
using System.Windows;using System.Windows.Controls;using Telerik.Windows.Controls;using Telerik.Windows.Documents.Lists;using Telerik.Windows.Documents.Model;using Telerik.Windows.Documents.RichTextBoxCommands;namespace ...{ public partial class DescriptionEditor : UserControl { public DescriptionEditor() { InitializeComponent(); ... InitializeEventsForTextboxes(PublicDescriptionEditor); } ... private void InitializeEventsForTextboxes(params RadRichTextBox[] textboxes) { if (textboxes != null) { foreach (var textbox in textboxes) { ... // This is performed for the specific textbox. // We know this since other commands are working textbox.Commands.ChangeListStyleCommand.ListStyleChangedChanged += ListStyle_Changed; ... } } } private void ListStyle_Changed(object sender, StylePropertyChangedEventArgs<ListStyle> e) { // This never gets called ... } }}Relevant XAML code:
<UserControl x:Class="... DescriptionEditor" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Name="PersonDescriptionEditor"> ... <telerik:RadRichTextBoxx:Name="PublicDescriptionEditor"IsSelectionMiniToolBarEnabled="False" Grid.Row="1"/> <telerik:HtmlDataProvider Html="{Binding Path=DataContext, ElementName=PersonDescriptionEditor, Mode=TwoWay}" RichTextBox="{Binding ElementName=PublicDescriptionEditor}"> <telerik:HtmlDataProvider.FormatProvider> <telerik:HtmlFormatProvider> <telerik:HtmlFormatProvider.ExportSettings> <telerik:HtmlExportSettings DocumentExportLevel="Fragment" StylesExportMode="Inline" StyleRepositoryExportMode="DontExportStyles"/> </telerik:HtmlFormatProvider.ExportSettings> </telerik:HtmlFormatProvider> </telerik:HtmlDataProvider.FormatProvider> </telerik:HtmlDataProvider> ...</UserControl>Not really sure what you need to see, but the above code should contain all relevant parts
Hello,
I use IValueConverter to calculate a column value based on other two column values. The problem is that when I edit the cell value and press Enter I get the next gridview row in IValueConverter. Do you know what the problem is? I use the code below on a UserControl.
this.clubsGrid.ItemsSource = EvolucionMercados.GetClubs();
public static IEnumerable<Club> GetClubs() { ObservableCollection<Club> clubs = new ObservableCollection<Club>(); Club club; // Liverpool club = new Club("Liverpool", new DateTime(1892, 1, 1), 45362, 50.99f); club.Players.Add(new Player("Pepe Reina", 25, Position.GK, "Spain")); club.Players.Add(new Player("Jamie Carragher", 23, Position.DF, "England")); club.Players.Add(new Player("Steven Gerrard", 8, Position.MF, "England")); club.Players.Add(new Player("Fernando Torres", 9, Position.FW, "Spain")); clubs.Add(club); // Manchester Utd. club = new Club("Manchester Utd.", new DateTime(1878, 1, 1), 76212, 60.49f); club.Players.Add(new Player("Edwin van der Sar", 1, Position.GK, "Netherlands")); club.Players.Add(new Player("Rio Ferdinand", 5, Position.DF, "England")); club.Players.Add(new Player("Ryan Giggs", 11, Position.MF, "Wales")); club.Players.Add(new Player("Wayne Rooney", 10, Position.FW, "England")); clubs.Add(club); // Chelsea club = new Club("Chelsea", new DateTime(1905, 1, 1), 42055, 70.99f); club.Players.Add(new Player("Petr Čech", 1, Position.GK, "Czech Republic")); club.Players.Add(new Player("John Terry", 26, Position.DF, "England")); club.Players.Add(new Player("Frank Lampard", 8, Position.MF, "England")); club.Players.Add(new Player("Nicolas Anelka", 39, Position.FW, "France")); clubs.Add(club); // Arsenal club = new Club("Arsenal", new DateTime(1886, 1, 1), 60355, 35.19f); club.Players.Add(new Player("Manuel Almunia", 1, Position.GK, "Spain")); club.Players.Add(new Player("Gaël Clichy", 22, Position.DF, "France")); club.Players.Add(new Player("Cesc Fà bregas", 4, Position.MF, "Spain")); club.Players.Add(new Player("Robin van Persie", 11, Position.FW, "Netherlands")); clubs.Add(club); return clubs; }
<telerik:RadGridView Name="clubsGrid" Grid.Row="0" AutoGenerateColumns="False"> <telerik:RadGridView.Columns> <telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding Name}"> </telerik:GridViewDataColumn> <telerik:GridViewDataColumn Header="Est." DataMemberBinding="{Binding Established}" DataFormatString="{}{0:yyyy}"> </telerik:GridViewDataColumn> <telerik:GridViewDataColumn Header="Stadium Capacity" DataMemberBinding="{Binding StadiumCapacity}" DataFormatString="{}{0:N0}"> </telerik:GridViewDataColumn> <telerik:GridViewDataColumn Header="Ticket Price" DataMemberBinding="{Binding TicketPrice}" DataFormatString="{}{0:C2}"> </telerik:GridViewDataColumn> <telerik:GridViewDataColumn Header="Sellout Revenue" DataMemberBinding="{Binding Path=., Converter={StaticResource clubToSelloutRevenueConverter}}" DataFormatString="{}{0:C2}"> </telerik:GridViewDataColumn> </telerik:RadGridView.Columns> </telerik:RadGridView>Hi,
I am following the EndlessPagedCollectionView example as that closely related to what i want to achieve.
The similarity is that i need to keep loading data in batch and i don't know when it will be done.
However, it isn't truly endless. When it comes to an end, and i am at the last page, how do i disable the NEXT button in the RadDataPager? I've tried setting ItemCount / TotalItemCount but i don't seem to be able to disable the Next button while i am at the last page.
Any help?
btw, what's the difference between ItemCount vs TotalItemCount?
-A
Hi,
I'm looking for a way to change the default docking of the minimized tiles. Changing the FlowDirection property from LeftToRight to RightToLeft almost works, but it causes all of the controls in the RadTileViewItems to be right justified instead of left justified.
Also, is there a way to hide the Minimize button in a RadTileViewItem?
Thanks,
Paul
Hi,
For instance I have to cut fragment from a document and paste it in another one. The fragment is AnnotationRange and it has others annotation elements inside. When I insert it GetRootDocument for parent element is not null (it's my document), but for children it is null.
How can I set my document as owner for all internal elements?
Thanks in advance.
[Display(Name = "Account")] public string accnt { get; set;}
[DisplayFormat(DataFormatString="#,##0.0000")]
public double cnOpened { get; set; }
So I think I found an issue with tabbing between column headers, after the columns have been rearranged.
When changing column position (rearranging columns) on a rad grid, tabbing between headers does not follow the display index. In instead follows the original position of the column.
You can see this behavior on the "GridView Filtering Configuration" demo from the WPF controls examples Telerick tool.
Once you choose the Filtering Configuration demo\example, change the filtering mode to "FitlerRow". You can tab through the headers and the keyboard focus will go to each column properly (Customer ID, Company Name, Country, etc..)
If you move the Country column in between the Customer ID and Company Name. When starting at the Customer ID and tabbing, the tab order remains unchanged (Customer ID, Company Name, Country, etc..). When in fact it should go Customer ID, Country, Company Name, etc.
When selecting a row, the tab order works as expected.
I did some research, but was unable to find a way to work around this. Am I missing something.
Additionally, I was able to smooth out the tabbing (to reduce the number of tabs in the header), with the code below.
private void Grid_Loaded(object sender, RoutedEventArgs e)
{
foreach (var headerCell in AssociatedObject.ChildrenOfType<GridViewHeaderCell>())
{
//var popUp = headerCell.ChildrenOfType<Popup>().FirstOrDefault();
var filteringControl = headerCell.ChildrenOfType<FieldFilterControl>().FirstOrDefault();
if (filteringControl != null)
{
(filteringControl.ChildrenOfType<RadDropDownButton>().FirstOrDefault()).IsTabStop = false;
}
var contentControls = headerCell.ChildrenOfType<ContentControl>().Where( con => con.IsTabStop == true).ToList(); ;
foreach (var content in contentControls)
{
content.IsTabStop = false;
}
}
}
private void Grid_FieldFilterEditorCreated(object sender, EditorCreatedEventArgs e)
{
var stringFilterEditor = e.Editor as StringFilterEditor;
if (stringFilterEditor != null)
{
stringFilterEditor.MatchCaseVisibility = Visibility.Collapsed;
}
}
Thanks,
Cory
Hi,
I'm trying to build chart with real time data, where I display some values with a StepLineSeries, and this works fine. However, I want to display the Moving Average of those values as well, and for that I'm using the MovingAverageIndicator but it doesn't work.
If I display all the data at once the MovingAverageIndicator works just fine but, if I try to display it with the data being added in real time it doesn't work. Is this some limitation of the indicator or am I doing something wrong?
Best regards,
Diogo Duarte