Telerik Forums
UI for WPF Forum
4 answers
500 views
Hi,

We have an office word template project which opens up a wpf form when the user tries to launch it. 

The WPF form has one or more telerik Richtextbox controls. When the user start typing inside the textbox they get the above error.
ie."The dispatcher process has been suspended,but messages are still being processed.".

Even though this error occurs more when user tries to type fast inside the textbox, there are cases this happened even otherwise.

There is no event in our code that gets fired on TextChanged or anything similar.

Has anyone else experienced this?  Could someone help me to resolve this?

Many thanks,

Anu
Anu
Top achievements
Rank 1
 answered on 04 Nov 2013
1 answer
103 views
I have a rich text document which I have gone through and put "<<" and ">>" around keywords that I want to have a Mail Merge fields. I have tired to put in the merge fields in the XAML, but does not work well. What is the best way to programatically search through the text of a RadDocument and replace some text with MailMerge fields.
Boby
Telerik team
 answered on 04 Nov 2013
11 answers
317 views
Everything ran fine, then I updated to Q3 2013, did an update Wizard, ran my application and setting 

static MainWindow()
{
    RadRibbonWindow.IsWindowsThemeEnabled = false;
}

Renders my RadRibbonWindow as completely white now.  Setting it to true, I can see everything as expected.  
Tina Stancheva
Telerik team
 answered on 04 Nov 2013
1 answer
64 views

Hi,

we would like to switch our DataGrid loading mechanism to use the QueryableDataServiceCollectionView (on top of DataServiceContext), to mainly take advantage of paging, maybe filtering.

However due to some rich functionality in the grid, we are wrapping each 'RowModel' (record) with a 'RowViewModel', supporting the functionality in the grid. So the collection we currently bind the DataGrid.ItemsSource is of type IEnumerable<RowViewModel> rather than IEnumerable<RowModel>. This is done simply by running something like PageViewModel.GridItemsSource = data.Select(m => new RowViewModel(m));

The question is how to achieve the same result with QueryableDataServiceCollectionView? The records loaded will obviously be of type RowModel, however we would like to 'convert' them to 'RowViewModel' instances and bind those to the grid.

Any ideas?

Stevo

 

Nick
Telerik team
 answered on 04 Nov 2013
1 answer
191 views
Hi!
We are amazed with your controls for WPF, specially with RadDataForm.
But, we have one problem.
We need ComboBoxField to choose which Company has produced the Product.
And it's working well, but when we add new product and click OK, a NullReferenceException pops out.
Our code:
Company.cs
    class Company : IDataErrorInfo
    {
        public int _id;
        public int id
        {
            get
            {
                return _id;
            }
            set
            {
                _id = value;
            }
        }
 
        public string _name;
        public string name
        {
            get
            {
                return _name;
            }
            set
            {
                _name= value;
            }
        }
 
        public string Error
        {
            get;
            set;
 
        }
 
        public string this[string columnName]
        {
// . . .
        }
 
        public static void Add(Company ist)
        {
// . . .
        }
 
        public static void Edit(Company ist)
        {
// . . .
        }
 
        public static void Delete(Company ist)
        {
// . . .
        }
 
        public static List<Company> Get()
        {
// . . .
          }
}
Product.cs
    class Product: IDataErrorInfo
    {
        public int _id;
        public int id
        {
            get
            {
                return _id;
            }
            set
            {
                _id = value;
            }
        }
  
        public string _name;
        public string name
        {
            get
            {
                return _name;
            }
            set
            {
                _name= value;
            }
        }
 
        public Company _comp;
        public Company comp
        {
            get
            {
                return _comp;
            }
            set
            {
                _comp= value;
            }
        }
  
        public string Error
        {
            get;
            set;
  
        }
  
        public string this[string columnName]
        {
// . . .
        }
  
        public static void Add(Product ist)
        {
// . . .
        }
  
        public static void Edit(Product ist)
        {
// . . .
        }
  
        public static void Delete(Product ist)
        {
// . . .
        }
  
        public static List<Product> Get()
        {
// . . .
          }
}
And our AutoGeneratingField event of RadDataForm:
private void DataForm1_AutoGeneratingField_1(object sender, Telerik.Windows.Controls.Data.DataForm.AutoGeneratingFieldEventArgs e)
{
    if (e.PropertyName == "Error" || e.PropertyName == "id")
    {
        e.Cancel = true;
    }
    else if (e.PropertyName == "comp")
    {
        e.DataField = new DataFormComboBoxField()
        {
            ItemsSource = viewModel.companies,
            DisplayMemberPath = "name",
            SelectedValuePath = "id",
            DataMemberBinding = new Binding("comp.id")
            {
                Mode = BindingMode.TwoWay
            },
            Label = "Company"
        };                       
    }
    e.DataField.DataMemberBinding.ValidatesOnDataErrors = true;
    e.DataField.DataMemberBinding.NotifyOnValidationError = true;
}
And once again, this is working OK, but when we proceed with adding new product, NullReferenceException pops out because Company property of Product for adding is null.
Where we sin?
P.S: Sorry for our terrible English, we're from Serbia, and we implemented all CRUD operations with RadDataForm events (EditEnded, AddedNewRecord...).
Thanks in advance!
DMSoft
Maya
Telerik team
 answered on 04 Nov 2013
6 answers
132 views
Hello,

I tried to customize style TreeListViewRow to add behavior, but i met a problem to keep the default alternating row style (row white and grey)
Indeed, I Have the default alternating style in my RadTreeListView, but if I customize only the row style, I lost the alternating row style (all the row are white)
So I decide to customize also the alternating row style, based on the row style.

<Style
                x:Key="rowStyle"
                BasedOn="{StaticResource {x:Type telerik:TreeListViewRow}}"
                TargetType="{x:Type telerik:TreeListViewRow}">
                <Style.Setters>
                    <EventSetter
                        Event="MouseDoubleClick"
                        Handler="HandleRowDoubleClick" />
                </Style.Setters>
            </Style>
 
            <Style
                x:Key="alternateRowStyle"
                BasedOn="{StaticResource rowStyle}"
                TargetType="{x:Type telerik:TreeListViewRow}">
            </Style>

But with this, I lost also the alternating row background color

I set the background color of the style with bind of the AlternateRowBackground of the control (to keep inheritance).
<Style
                x:Key="alternateRowStyle"
                BasedOn="{StaticResource rowStyle}"
                TargetType="{x:Type telerik:TreeListViewRow}">
                <Style.Setters>
                    <Setter
                        Property="Background"
                        Value="{Binding AlternateRowBackground, Source={RelativeSource TemplatedParent}}" />
                </Style.Setters>
            </Style>


With this, it's work, but I have binding error on each alternate line : BindingExpression path error: 'AlternateRowBackground' property not found on 'object' ''RelativeSource' (HashCode=46024298)'. BindingExpression:Path=AlternateRowBackground; DataItem='RelativeSource' (HashCode=46024298); target element is 'TreeListViewRow' (Name=''); target property is 'Background' (type 'Brush')

I undestand If the color work, it's because when binding fail, telerik engine seems to put the default value, because Value={Binding Foo or whatever produce the same result.

So I think it's because the AlternateRowBackground property isn't set in my RadTreeListView, I do this with yellow for test, but same error! (binding error, and the alternate background color is grey). I don't understand, can you explain this ?

Thanks,

Sincerly

Gourdon Julien

PS : sorry for my english, I'm french
Julien
Top achievements
Rank 1
 answered on 04 Nov 2013
3 answers
97 views
Hello,

how can I avoid that the EndEdit Method of my entity is raised when leaving/switching the row.
I changed the ActionOnLostFocus to "None", but this was not the solution.

Thank you,
Manuel
Yoan
Telerik team
 answered on 01 Nov 2013
1 answer
153 views
Hi guys I'm trying to draw a diagram like this one: http://www.wu.ac.at/ic/erp/webtrainer/dwh_webtrainer/exercise/20/20d-l-1.gif

Actually the only thing I really can't figure out is how to customize the connection template in order to draw an orthogonal line on top of a link (see the connection from the grayed node to the "driver" node).

The presence (or absence) of the line should be driven by a property in my model (the entire diagram is data bound to a graph source).

Thank you
Pavel R. Pavlov
Telerik team
 answered on 01 Nov 2013
1 answer
150 views

I just installed the latest version of WPF controls (2013.3.1016.40) and my TreeView no longer registers this property.  Can you tell me what the new alternative is for this property?  Thanks.

tv.ItemsOptionListType = OptionListType.CheckList;
Pavel R. Pavlov
Telerik team
 answered on 01 Nov 2013
1 answer
158 views
Hello, I would like to bind the gridview to viewmodels. I was thinking I'd have a TableViewmodel, which contains a collection of ColumnViewmodels and RowViewmodels, and finally CelViewModels. How would I go about doing this?

Thanks,
Scott
Dimitrina
Telerik team
 answered on 01 Nov 2013
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?