Telerik Forums
UI for WPF Forum
7 answers
169 views

Hallo everyone,

in an actual project I have the following problem. I use:

-RadMaskedNumericInput* 

-MaskToken (For Example: #9.2)

The user can't write more than 11 numeric digits in it. Thats ok, but if he copy & paste a value with more digits in it, it appears in the 

DataRow behind (See attached file). Even if AllowInvalidValues equals to false. 

Its a workaround to prove the length by every input,  but thats not really what the developer expects. In a business application with over hundreds of elements a developer will not check everytime if the length of the value is correct, so this can't be the right way.

*Don't know if it appears by other "MaskedInput"-controls

Petar Mladenov
Telerik team
 answered on 23 Jun 2016
4 answers
154 views

Hi, I have two questions regarding recorder in RadDocumentPane.

1. I am using RadDocumentPane to host several panes. I would like to allow users to reorder these panes by drag and drop any of the tabs. In the same time, I have a RadTreeView, which contains the same panes like RadDocumentPane. I would like to be able to get notified when user finished reordering the tabs in RadDocumentPane so that I can sync it to my RadTreeView. What event should I subscribe to in the RadDocumentPane? So far I have tried Drop, DragDrop.Drop, none of these triggers when I finished reorder and drop onto RadDocumentPane.

2. Also, I would like to change the order in RadTreeView, and sync it to RadDocumentPane. By DragDrop in RadTreeView, I could reorder these view models, and I am doing this:

        public void UpdatePanes(IEnumerable<BasePaneViewModel> pages)
        {
            if(pages == null || Panes == null) return;

            foreach (var page in pages)
            {
                Panes.Remove(page);
                Panes.Add(page);
            }
        }

Would this be a good way to recorder in RadDocumentPane or if there is better way to do it?

 

Thanks.

Mingxue

Yana
Telerik team
 answered on 23 Jun 2016
1 answer
127 views

Hi everybody!

I have this problem: while the user types a new word in a RadRichTextBox with SpellChecker activated, the red wavy line appears for every character that makes the partial word wrong, even if the word is not completely typed.

Example: writing the word "these" in your RadRichTextBox Demo Application

t --> error
h --> error
e --> OK (word = "the")
s --> error
e --> OK (word = "these")

Since out application is primarily used by dyslexic young children (7-13 yo), seeing this fictitious error is a problem because they can't easily figure out if there's a typo in what they wrote before or simply because the word is still incomplete.

 

Now for the million-dollar question: Is there a way to inhibit this behavior and activate spellchecking for a newly typed word ONLY after a non alphanumeric char has been typed? This mechanism should trigger when I press space, but also Enter or a punctuation char like ? or !, full stop or comma and so on.

P.S.: I was in doubt about where posting this thread, RichTextBox or SpellChecker. If I posted it in the wrong place, I ask for an Admin to move it where it should belong.


Thanks in advance, cheers!

 Fabrizio

Boby
Telerik team
 answered on 23 Jun 2016
7 answers
830 views

Well, it used to work, at least on version 2012.3 (I've verified it)

However, if you do the same on 2016.2, then it doesn't work. The cell is left in some kind of edit mode, while the keyboard cursor is not blinking.

 

This is frustrating, since after updating to the new version, I'm wasting more time on fixing stuff that used to work than writing new features, and I'm sure that I'll find more issues in the future.

 

Is there something that can be configured in order to make it work like it used to? I already tried ActionOnLostFocus="CommitEdit"

Why was this feature removed? It seems only logical to exit edit mode when clicking anywhere outside the edited cell.

 

Thanks.

BENN
Top achievements
Rank 1
 answered on 23 Jun 2016
10 answers
914 views
Your example for the Reorder rows is very good with the exception that I can't show the DropPreviewLine.  In the silverlight documentation it shows an example for it with the preview line, but neither the silverlight or WPF demo example have the preview line.  I am hoping that you have a WPF example that will show the preview line as well.

Thanks!

Troy
Dilyan Traykov
Telerik team
 answered on 22 Jun 2016
3 answers
266 views

 

Greetings

Currently I'm not that experienced with styles in WPF and after some research I decided to give it a shot to ask. 

I'm working with with the RadGridView and I'd like to change the Foreground of the header of a sorted column. 

Within the styles of Telerik I found there are some visual states to determine the colour of the border or for the ascending/ descending arrow. Yet there is no description to change the colour of the Foreground. 

Yet doing some research, I found some code to add to change the Foreground as well within the VisualState. 

<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="(TextBlock.Foreground)">
    <DiscreteObjectKeyFrame KeyTime="0" Value="White" />
</ObjectAnimationUsingKeyFrames>

Yet, this isn't working. This entirely breaks the VisualState of 'Ascending'/ 'Descending' and the following exception within Output can be found:

A first chance exception of type 'System.InvalidOperationException' occurred in PresentationFramework.dll

Sorry for asking perhaps a dumb question. I'm still in the learning process of Telerik styles and WPF styles in general. 

Kind regards

Kenneth

Mark
Top achievements
Rank 1
 answered on 22 Jun 2016
3 answers
532 views
I have an editable RadGridView with set column widths.  When the user clicks a cell to edit its contents, the editing TextBox appears to be much more narrow than the width of its column.  How can I change this so that the TextBox stretches to the column width?

I tried using a template for the cell but this prevented the cell/row validation from working:
<DataTemplate x:Name="editCellTemplate">
    <Grid>
        <TextBox MaxLength="100" Margin="5,3"
                 Width="{Binding ActualWidth,
                            RelativeSource={RelativeSource
                               Mode=FindAncestor,
                               AncestorType={x:Type telerik:GridViewCell}}}"
                 Text="{Binding Label, Mode=TwoWay}" />
    </Grid>
</DataTemplate>
 
<telerik:RadGridView Margin="10" MinHeight="300" RowHeight="30"
              HorizontalAlignment="Left" VerticalAlignment="Top"
              AutoGenerateColumns="False" IsFilteringAllowed="False"
              CanUserInsertRows="True" CanUserDeleteRows="False"
              CanUserFreezeColumns="False" CanUserReorderColumns="False"
              ShowGroupPanel="False" ShowInsertRow="True"
              ItemsSource="{Binding SourceView, Mode=OneWay}">
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn x:Name="Label" Header="Label" Width="300"
                           DataMemberBinding="{Binding Label, Mode=TwoWay}"
                           CellEditTemplate="editCellTemplate" />
        <telerik:GridViewCheckBoxColumn x:Name="Inactive" Header="Inactive"
                             DataMemberBinding="{Binding IsDeleted, Mode=TwoWay}"
                             Width="Auto" />
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

Then I tried setting the CellStyle property, but this had no effect:
<telerik:GridViewDataColumn.CellStyle>
    <Style>
        <Setter Property="TextBox.MaxLength" Value="100" />
        <Setter Property="TextBox.Margin" Value="5" />
        <Setter Property="TextBox.Width"
              Value="{Binding ActualWidth, RelativeSource={RelativeSource
                 Mode=FindAncestor, AncestorType={x:Type telerik:GridViewCell}}}" />
    </Style>
</telerik:GridViewDataColumn.CellStyle>
Stefan
Telerik team
 answered on 22 Jun 2016
3 answers
82 views

Hi,

I'm using Isolated Storage, and save a value to both the TreeListView and it's GridViewDataColumn...but when my page comes up the saved sorting value is not being used, so I have to use a third value and read it and manually sort:

 

XAML:

            <telerik:Label x:Name="ProjectTreeViewOrdering" Content="ASC" Visibility="Collapsed" telerik:PersistenceManager.StorageId="THOR_ProjectsTreeSorting" />

 

CODE:

        string[] projectsSortingIsolatedStorage = { "THOR_ProjectsTreeSorting" };

 

        private void OnWindowLoaded(object sender, EventArgs e)
        {

                isoProvider.LoadFromStorage(projectsSortingIsolatedStorage);

                IEnumerable<TreeProjectViewModel> projects = ProjectsTreeView.ItemsSource as IEnumerable<TreeProjectViewModel>;
                if (ProjectTreeViewOrdering.Content.Equals("Ascending"))
                {
                    ProjectsTreeView.ItemsSource = projects.OrderBy(p => p.Name);
                }
                else if (ProjectTreeViewOrdering.Content.Equals("Descending"))
                {
                    ProjectsTreeView.ItemsSource = projects.OrderByDescending(p => p.Name);
                }

...which gets my TreeListView sorted, but then all the Groups collapse, which I don't want.

Using "ExpandAllGroups" had no effect.

If anyone has a better and more proper way to sort, save, and load a RadTreeListView that has a GridViewDataColumn defined within it, I sure would love to know about it. To get the list sorting to persist, I currently have a value save in the TreeListView, the GridViewDataColumn, and a "desperate" label as seen above.3 values seems like overkill to get the job done. I found without the value int he GridViewDataColumn being saved, I'd get no arrows in the TreeListView control, which was bad. Without the label value being stored, I got no sorting capability....so it's all bad at the moment.

Barry

 

 

 

Stefan
Telerik team
 answered on 22 Jun 2016
3 answers
105 views

Hi, I have a RadGridView which is setup to have:

RowVirtualization=True
ColumnVirtualization=True
SelectionMode=Extended
ClipboardCopymode=Cells,Header
AutoGenerateColumns=False

There are 6 columns in this grid all bound to strings similar to
<telerik:GridViewDataColumn Header="FirstName"  DataMemberBinding="{Binding Name}">

I have populated the grid with ~60,000 records

Pressing ctrl+A to select all takes about 3 seconds (which I am ok with I guess)
My problem is pressing Ctrl+C to copy all the rows just freezes the UI and it never finishes (I force closed the app after about 5 minutes if I walk away for about 20 it finishes eventually)

Why does copying all these rows take so long? Is there a way I can speed it up?
I made sure I populated the grid completely first so all this time taken is purely the copy method?

 

Stefan
Telerik team
 answered on 22 Jun 2016
2 answers
186 views

Hello,

 

I am using a RadGridView with a RadDataPager to display a collection of items.

I use a GridViewSelectColumn to enable to select some of these items and to perform actions only on those who are selected.

My issue is that when I check the GridViewSelectColumn of some items, if I change the page and that I go back to the previous one, the items are not selected anymore.

I searched the forum and tried a few things but nothing worked.

 

Thanks in advance.

Regards,
Adrien.

Adrien
Top achievements
Rank 1
 answered on 22 Jun 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?