Telerik Forums
UI for WPF Forum
1 answer
115 views
I get an error in the visual studio designer every time I open a specific view that includes a HierarchyChildTemplate with a DataTemplate (see below). I'm using 2012.1.326.40 assemblys. During Runtime everything works fine and as expected but I'm unable to use the Visual Studio Designer which is very annoying.

Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
   bei Microsoft.Expression.Platform.WPF.InstanceBuilders.DocumentNodeObjectReader.get_Value()
   bei System.Xaml.XamlWriter.WriteNode(XamlReader reader)
   bei System.Windows.Markup.WpfXamlLoader.TransformNodes(XamlReader xamlReader, XamlObjectWriter xamlWriter, Boolean onlyLoadOneNode, Boolean skipJournaledProperties, Boolean shouldPassLineNumberInfo, IXamlLineInfo xamlLineInfo, IXamlLineInfoConsumer xamlLineInfoConsumer, XamlContextStack`1 stack, IStyleConnector styleConnector)
   bei System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
   bei System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, Boolean skipJournaledProperties, Uri baseUri)
   bei System.Windows.Markup.XamlReader.Load(XamlReader xamlReader, ParserContext parserContext)
   bei System.Windows.Markup.XamlReader.Load(XamlReader reader)
   bei Microsoft.Expression.Platform.WPF.InstanceBuilders.FrameworkTemplateInstanceBuilder.InstantiateTemplate(IDocumentRoot xamlDocument, TemplateSerializerContext context)
   bei Microsoft.Expression.DesignModel.InstanceBuilders.FrameworkTemplateInstanceBuilderBase`7.Instantiate(IInstanceBuilderContext context, ViewNode viewNode)
   bei Microsoft.Expression.DesignModel.Core.ViewNodeManager.Instantiate(ViewNode viewNode)

 <telerik:RadGridView.HierarchyChildTemplate>
                            <DataTemplate>
                                <telerik:RadGridView ItemsSource="{Binding PartsInOrders}" 
                                             x:Name="PartInOrderGrid" 
                                             ShowGroupPanel="False"
                                             ScrollMode="RealTime"
                                             CanUserInsertRows="False"
                                             CanUserDeleteRows="False"
                                             IsReadOnly="True"
                                             RowActivated="GridRowActivated"
                                             AutoGenerateColumns="False">
                                    <ia:Interaction.Behaviors>
                                        <commonBehaviours:GridToolsBehavior />
                                    </ia:Interaction.Behaviors>
                                    <telerik:RadGridView.Columns>
                                        <telerik:GridViewDataColumn DataMemberBinding="{Binding ItemNumber, Mode=OneWay}" Header="{loc:Translation ItemNumber}" />
                                        <telerik:GridViewDataColumn DataMemberBinding="{Binding ItemDescription, Mode=OneWay}" Header="{loc:Translation ItemDescription}" />
                                        <telerik:GridViewDataColumn DataMemberBinding="{Binding CommissionNumber, Mode=OneWay}" Header="{loc:Translation CommissionNumber}" />
                                        <telerik:GridViewDataColumn DataMemberBinding="{Binding PointToDeliver, Mode=OneWay}" Header="{loc:Translation PointToDeliver}" />
                                    </telerik:RadGridView.Columns>
                                </telerik:RadGridView>
                            </DataTemplate>
                        </telerik:RadGridView.HierarchyChildTemplate>
Daniel
Top achievements
Rank 1
 answered on 22 May 2012
5 answers
158 views
One of our customers is encountering this following error/call stack when they load our program and move the mouse. We were unable to recreate. However, based on similar forum posts, we had the customer turn off the Tablet PC Input service and the error went away. Is there a better solution than turning that service off? We would like to be able to leave it on if possible to reduce issues/setup needed for future customers. Do you have a fix so the error doesn't occur in the first place? The customer is on the 2011 Q3 version (non-service pack)

Thanks

Object reference not set to an instance of an object.
at Telerik.Windows.Controls.RadPaneAutomationPeer.GetNameCore()
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
at System.Windows.ContextLayoutManager.fireAutomationEvents()
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
Boyan
Telerik team
 answered on 22 May 2012
3 answers
252 views
Hi,

I have a large number of DXF CAD Files which I have converted to either SHP files or stored the Geometry in SQL Server.  The requirement is to display these on the Map control.  The files which have a Spatial Reference System specified are displaying properly.

However a number of files do not have a SRS specified, these require displaying on the map, but obviously without any Map Providers. I will assume that the coordinates are in arbitrary X, Y. the demo examples use SHP files, can this be achieved by retrieving data directly from SQL Server?

Many thanks,

Adnan
Andrey
Telerik team
 answered on 22 May 2012
4 answers
178 views
Hi Support,
   I'm working on a touch screen app which requires "Image Editor" control with big icons. I tried setting my custom images by setting width & height, but its not working...Can u give me a work around to achieve the desired result.

Thank u
Selva
Selva M
Top achievements
Rank 2
 answered on 22 May 2012
9 answers
405 views
Hello!

I'm new to WPF, but as life goes, I have to bind to a ObservableCollection of Business Objects to a RadGridView in Code Behind, because the number of GridViewDataColumns is dynamic. Here I have an example (in my real application, my business class contains fields for sales data and the radgridview should be able to show a different number of sales periods).

Example:
=======

Business Object:
----------------------
public class Person : INotifyPropertyChanged
{
    private string _Firstname;
    private string _Lastname;
    
    public evebt PropertyChangedEventHandler PropertyChanged;

    public string Firstname
    {
        get { return _Firstname; }
        set 
        {
            _Firstname = value;
            OnPropertyChanged("_Firstname");
        }
    }

    public string Lastname
     {
         get { return _Lastname; }
         set 
         {
             _Lastname = value;
             OnPropertyChanged("_Lastname");
         }
     }

    protected void OnPropertyChanged(string strPropName) 
     { 
         PropertyChangedEventHandler handler = PropertyChanged; 
         if (handler != null) 
         { 
             handler(this, new PropertyChangedEventArgs(strPropName)); 
         }     
     }
  
}

ObservableCollection:
-----------------------------

public class Persons : ObservableCollection<Person>
{
    public Persons() : base()
    {
    }
}

ExamplePage:
-------------------
public partial class ExamplePage:Page
{
    
    Persons _p;

    public ExamplePage()
    {
        InitializeComponent();
        //Pseudo-Code: the ObservableCollection ist filled up in the DAL
        _p = DAL.GetPersons();

        //How or what is the way of binding the ObservableCollection to the radgridview1??
        //Possibility 1:
        radgridview1.DataContext = _p;
        //Possibility 2:        
        radgridview1.ItemsSource= _p;
        //Possibility ...: anything else?

        GridViewDataColumn colFirstname = new GridViewDataColumn();
        colFirstname.Header = "Firstname";
        colFirstname.UniqueName = "cFirstname";
        
        //I think, that here is the right place for column-bindung, but how?

        radgridview1.Columns.Add(colFirstname);        

        GridViewDataColumn colFirstname = new GridViewDataColumn();
        colLastname.Header = "Lastname";
        colLastname.UniqueName = "cLastname";
 
        //I think, that here is the right place for column-bindung, but how?

        radgridview1.Columns.Add(colLastname);   

    }
}

Please help me!

Kind regards

Michael
Vlad
Telerik team
 answered on 22 May 2012
3 answers
122 views
Dear All,
Is there any way to change background brush (color or image) of an specific row in code behind (by row & cell number)?
Is there any way to got focus to an specific row (by row & cell number)?

Thanks
Vlad
Telerik team
 answered on 22 May 2012
2 answers
132 views
Hi,

I have two questions regarding ScheduleView Component

1. Is their a way to select all recurrence views associated to that appointment when any of its item is selected, i have attached a snapshot     to show how i require it when any one is selected
2. Is there a way to hide resize button (we dont want that feature)

Thanks
Moem
Top achievements
Rank 1
 answered on 21 May 2012
1 answer
96 views

key: WPF, RadRichTextBox, RadDocument

I did the following steps to print merged RadDocument but it does not print and calling Print method hangs on forever. I had to kill the process.  Printing 1 Document works fine but same issue happens when I try to print 2 merged documents.

1. I am merging a list of RadDocuments  in to one RadDocument using methods answered in this forum.       
2. Then setting RadRichTextBox’s  document to the above created merged RadDocument.
3. Then printing using RadRichTextBox’s print method. radRichTextBox.Print("richtextbox", PrintMode.Native)

FYI, for Part 1) I did try this:
    foreach(var document in radDocuments)
    {
        mergedDocument.CaretPosition.MoveToLastPositionInDocument();

        mergedDocument.InsertInline(new Telerik.Windows.Documents.Model.Span(FormattingSymbolLayoutBox.PAGE_BREAK));

        mergedDocument.InsertFragment(new DocumentFragment(document));

}

and also  this:
 RadDocument mergedDocument = new RadDocument();
 foreach (RadDocument document in documents)
 {
     foreach (Section section in document.Sections)     {
         Section copySection = section.CreateDeepCopy() as Section;
         document.Sections.Remove(section);
         mergedDocument.Sections.Add(copySection);
     }
 }

Am i merging RadDocuments correctly? What could be the issue?
If this is a known Issue, then whats the best way to Merge and Print RadDocuments?

By the way : Document 1 had 7 pages and Document had 4 pages with 4 images total. It seems that as soon as I merge it does not print.

Iva Toteva
Telerik team
 answered on 21 May 2012
1 answer
138 views

key: WPF, RadRichTextBox, RadDocument

I did the following steps to print merged RadDocument but it does not print and calling Print method hangs on forever. I had to kill the process.  Printing 1 Document works fine but same issue happens when I try to print 2 merged documents.

1. I am merging a list of RadDocuments  in to one RadDocument using methods answered in this forum.       
2. Then setting RadRichTextBox’s  document to the above created merged RadDocument.
3. Then printing using RadRichTextBox’s print method. radRichTextBox.Print("richtextbox", PrintMode.Native)

FYI, for Part 1) I did try this:
    foreach(var document in radDocuments)
    {
        mergedDocument.CaretPosition.MoveToLastPositionInDocument();

        mergedDocument.InsertInline(new Telerik.Windows.Documents.Model.Span(FormattingSymbolLayoutBox.PAGE_BREAK));

        mergedDocument.InsertFragment(new DocumentFragment(document));

}

and also  this:
 RadDocument mergedDocument = new RadDocument();
 foreach (RadDocument document in documents)
 {
     foreach (Section section in document.Sections)     {
         Section copySection = section.CreateDeepCopy() as Section;
         document.Sections.Remove(section);
         mergedDocument.Sections.Add(copySection);
     }
 }

Am i merging RadDocuments correctly? What could be the issue?
If this is a known Issue, then whats the best way to Merge and Print RadDocuments?

By the way : Document 1 had 7 pages and Document had 4 pages with 4 images total. It seems that as soon as I merge it does not print.

Thanks

Iva Toteva
Telerik team
 answered on 21 May 2012
4 answers
108 views
Hello!

I have many expression columns in my grid.

In the RowLoaded-Event I want th check, if the result of the expression is lower than 0. If yes, the text (forecast) color should be set to red.
How can I access the result of the expression?

private void gridview1(object sender, RowLoadedEventArgs e)
{
   var myExpressionCellList = e.Row.ChildrenOfType<GridViewCell>.Where(c => c.Column.UniqueName == "eAbwVjKgMon1").toList();
   foreach(GridViewCell cell in myExpressCellList)
   {
      cell. .... ?????
   }
}

I tried different things, but I'm not able to get the value for checking.

What I'm doing wrong? Please help.

Kind regards

Michael

Dimitrina
Telerik team
 answered on 21 May 2012
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
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
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
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?