Telerik Forums
UI for WPF Forum
0 answers
138 views

I want a hex column both in display and edit mode, i.e. WYSIWYG.

Such as:  010, ABC, FE0, b
ut failure in edit mode.



<telerik:GridViewMaskedInputColumn
          DataMemberBinding="{Binding Address}"
          Header="Hardware Address"
          DataFormatString="{}{0:X3}"
          MaskType="Numeric"
          Mask="d3">                   
</telerik:GridViewMaskedInputColumn>
 
private ushort _address;
public ushort Address
{
    get { return _address; }
    set
    {
        if (value != _address)
        {
            _address = value;
            OnPropertyChanged("Address");
        }
     }
}




Yu
Top achievements
Rank 1
 asked on 09 Oct 2013
3 answers
375 views

In WPF Help System(2013 Q2)



Controls-->RadTreeView-->How To-->Get Previous, Next, Parent and Sibling Node of a Specific TreeView Item-->Accessing the ParentItem and RootItem



ObservableCollection<Object> selectedItems = treeView.SelectedItems;

RadTreeViewItem item = selectedItems[ 0 ] as RadTreeViewItem;



Maybe not cast successfully. Should be?



RadTreeViewItem item = treeView.SelectedContainer ;



In RadTreeView class(Pay a attention to both *item and *contrainer type):

public RadTreeViewItem SelectedContainer { get; private set; }

public Object SelectedItem { get; set; }



But in RadTreeView class:

public Object Item { get; internal set; }

public RadTreeViewItem NextItem { get; }

public RadTreeViewItem ParentItem { get; internal set; }

public RadTreeViewItem PreviousItem { get; }



I think it should be:

public Object Item { get; internal set; }

public Object NextItem { get; }

public Object ParentItem { get; internal set; }

public Object PreviousItem { get; }



public RadTreeViewItem NextContainer { get; }

public RadTreeViewItem ParentContainer { get; internal set; }

public RadTreeViewItem PreviousContainer { get; }



In both RadTreeView and RadTreeViewItem, Item and its Container should be clearly different.

Thanks!


Hristo
Telerik team
 answered on 09 Oct 2013
1 answer
128 views
HI All,

        I need an idea how to implement the below one.
        
            I have two RadDockPanels in a usercontrol,where one dock panel has another usercontrol which consists of telerik rad gridview as a child element and another as the graph related to the data in the grid view.

The requirement is there is one control whether a button or toggle when we click on it only dock panel 1 with grid view expanded should be appeared in the screen and the other dock panel should get collapsed and a button to reset it else if it is a toggle when we again click on it,it should get reset.

I am short of ideas,could any one help me out in this soon,

Thanks,
Ramya
Kalin
Telerik team
 answered on 09 Oct 2013
1 answer
203 views
A little while ago, we changed the rtf editor used in our application from another third party editor to the telerik RichTextBox editor.  However, I have recently found that Rtf docs created in the previous editor contain list styles that Telerik is unable to handle correctly.  In some cases it just won't display them properly, and in worse case it will crash my application.

The following document causes the editor to crash my application:

{\rtf1\ansi\deff0\uc1\ansicpg1252\deftab720{\fonttbl{\f0\fnil\fcharset1 Times New Roman;}{\f1\fnil\fcharset1 WingDings;}}{\colortbl\red0\green0\blue0;\red255\green0\blue0;\red0\green128\blue0;\red0\green0\blue255;\red255\green255\blue0;\red255\green0\blue255;\red128\green0\blue128;\red128\green0\blue0;\red0\green255\blue0;\red0\green255\blue255;\red0\green128\blue128;\red0\green0\blue128;\red255\green255\blue255;\red192\green192\blue192;\red128\green128\blue128;\red0\green0\blue0;}\wpprheadfoot1\paperw12240\paperh15840\margl1800\margr1800\margt1440\margb1440\headery254\footery254\endnhere\sectdefaultcl{\*\generator WPTools_5.18;}{\*\listtable{\list\listtemplateid1
{\listlevel\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent360\levelnfc1{\leveltext\'02\'00.;}{\levelnumbers\'01;}}
{\listlevel\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent360\levelnfc3{\leveltext\'02\'01.;}{\levelnumbers\'01;}}
{\listlevel\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent360\levelnfc0{\leveltext\'02\'02.;}{\levelnumbers\'01;}}
{\listlevel\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent360\levelnfc4{\leveltext\'02\'03);}{\levelnumbers\'01;}}
{\listlevel\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent360\levelnfc2{\leveltext\'03(\'04);}{\levelnumbers\'02;}}
{\listlevel\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent360\levelnfc4{\leveltext\'03(\'05);}{\levelnumbers\'02;}}
{\listlevel\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent360\levelnfc0{\leveltext\'03(\'06);}{\levelnumbers\'02;}}
{\listlevel\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent360\levelnfc0{\leveltext\'03(\'07);}{\levelnumbers\'02;}}
{\listlevel\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent360\levelnfc0{\leveltext\'03(\'08);}{\levelnumbers\'02;}}
\listid1}}{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}{\plain\fs24 test @ test 123 /\par
\pard\plain\plain\fs24\par
\plain\fs24 test \'E0 test \par
\pard\plain\plain\fs24\par
\pard\plain\plain\fs24\par
\ls1\ilvl-1{\listtext\fs24 (1)\tab}\plain\fs24\line test   Resume\par
}}


When this document is loaded, using version 2012.3.1129.40 of the telerik wpf components, I initially get the following exception:

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.ThrowHelper.ThrowArgumentOutOfRangeException()
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at Telerik.Windows.Documents.Model.Paragraph.get_LeftIndent()
   at Telerik.Windows.Documents.Model.Paragraph.get_LeftMargin()
   at Telerik.Windows.Documents.Layout.SectionLayoutBox.MeasureOverrideInternal(SizeF availableSize)
   at Telerik.Windows.Documents.Layout.SectionLayoutBox.MeasureOverride(SizeF availableSize)
   at Telerik.Windows.Documents.Layout.LayoutElement.MeasureCore(SizeF availableSize)
   at Telerik.Windows.Documents.Layout.LayoutElement.Measure(SizeF availableSize)
   at Telerik.Windows.Documents.Layout.DocumentLayoutBox.MeasureOverrideInternal(SizeF availableSize)
   at Telerik.Windows.Documents.Layout.DocumentLayoutBox.MeasureOverride(SizeF availableSize)
   at Telerik.Windows.Documents.Layout.LayoutElement.MeasureCore(SizeF availableSize)
   at Telerik.Windows.Documents.Layout.LayoutElement.Measure(SizeF availableSize)
   at Telerik.Windows.Documents.Model.RadDocument.Measure(SizeF measureSize)
   at Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
   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)

The application will continue throwing exceptions until either it crashes or I have to kill it.  I've tried loading this document using the Demo control included in the Q2 2013 SP1 demos, and while it doesn't crash it won't load the document giving a modal dialog saying "The file cannot be opened".  If I manually strip out the \*\listtable section, the telerik editor will be able to load the document without problem, but the list will no longer be numbered as expected. MS Word & WordPad will display this document without any issue.

I have an immediate solution to this problem, using another rtf library to resave without list styling, but it would be ideal if I didn't have to do that, as it changes the styles of the lists in any of these documents.
Alex
Telerik team
 answered on 09 Oct 2013
7 answers
603 views
Hi,
i have multiple y-axis in my graph which is being plotted dynamically and name associated with it comes on the basis of selection done in dropdown list.my project follows MVVM architecture. x-axis represents time.so i need to generate all y values for particular time and then add the lineseries to the Series dynamically. problem is that graph is being plotted but could not be seen.
       
private void LoadData()
        {
            rnd = new Random();
            GraphDatas = new ObservableCollection<GraphData>();
            GraphData gd = null;
            Linearaxis = new List<LinearAxis>();
            for (int x = 0; x < 35; x++)
            {
                foreach (WeldDataMapping _weldDataMapping in _arrayOfWeldDataMapping.Where(ab => ab.IsSelected))
                {
                    GraphDatas = new ObservableCollection<GraphData>();
                    gd = new GraphData();
                    gd.XValue = x;

                    gd.YValue = rnd.NextDouble() * 100 ;
                    GraphDatas.Add(gd);


                    LineSeries line = new LineSeries();
                    Brush objBrush = new SolidColorBrush((Color)ColorConverter.ConvertFromString(_weldDataMapping.WeldDataColor));
                    if (!Linearaxis.Any(ab => ab.Title.ToString() == _weldDataMapping.WeldDataName))
                    {

                        LinearAxis yaxis = new LinearAxis { Title = _weldDataMapping.WeldDataName, Foreground = objBrush, LineStroke = objBrush, FontSize = 15 };
                        line.VerticalAxis = yaxis;
                        Linearaxis.Add(yaxis);
                        line.Name = _weldDataMapping.WeldDataName;
                        line.Stroke = new SolidColorBrush((Color)ColorConverter.ConvertFromString(_weldDataMapping.WeldDataColor));
                        line.DisplayName = _weldDataMapping.WeldDataName;
                        line.CategoryBinding = new PropertyNameDataPointBinding() { PropertyName = "XValue" };
                        line.ValueBinding = new PropertyNameDataPointBinding() { PropertyName = "YValue" };
                        line.ItemsSource = GraphDatas;
                        //adds the lineseries to the graph.
                        _graphView.xCartesianGraph.Series.Add(line);
                    }

                    else
                    {

                        line.VerticalAxis = Linearaxis.FirstOrDefault(ab => ab.Title.ToString() == _weldDataMapping.WeldDataName);
                        line.Name = _weldDataMapping.WeldDataName;
                        line.Stroke = new SolidColorBrush((Color)ColorConverter.ConvertFromString(_weldDataMapping.WeldDataColor));
                        line.DisplayName = _weldDataMapping.WeldDataName;
                        line.CategoryBinding = new PropertyNameDataPointBinding() { PropertyName = "XValue" };
                        line.ValueBinding = new PropertyNameDataPointBinding() { PropertyName = "YValue" };
                        line.ItemsSource = GraphDatas;
                        //adds the lineseries to the graph.
                        _graphView.xCartesianGraph.Series.Add(line);
                    }
                    

                }
            }
        }

please provide me the solution asap.
Senthil kumar
Top achievements
Rank 1
 answered on 09 Oct 2013
2 answers
154 views
Hi,

Is RadWrapper Ok to use?  I added the radwrapper.dll to my project, then my app crashes when I close the app.  I did not even reference it my code.  When I remove the radwrapper.dll the app does not crash.  Can you shed any light on the use, value etc of this dll.  I am trying to replace the MS MessageBox.  If not this dll do you have any code to replace the MessageBox.  To be specific I want a messagebox that contains New, Save and Cancel buttons and returns the button pressed.  See link below about radwrapper.dll.

Thanks
Rich

http://www.codeproject.com/Articles/164934/RadMessageBox-for-the-Telerik-WPF-Controls
Richard Harrigan
Top achievements
Rank 1
 answered on 09 Oct 2013
0 answers
78 views
Hi,
I am using RadGridView with RowDetailsTemplate, the issue is user has to click on the + or - symbol to expand/collapse.
User is expecting that expand/collapse should happen when they are clicking anywhere within the square surrounding the + or + symbol
Could any one help?





										
Member
Top achievements
Rank 1
 asked on 08 Oct 2013
0 answers
176 views
I need to create high performance grid inside grid when i use (RowDetailsTemplate) telerik generate dynamic sub grid instead of the the one i define it 

* when i use (HierarchyChildTemplate
) it works fine but there is big delay when expand row to show it's detail

* what is the different between (HierarchyChildTemplate) and (RowDetailsTemplate)

Code :

 <telerik:RadGridView x:Name="grd_Result_Sector"   GroupRenderMode="Flat"<br><span class="Apple-tab-span" style="white-space:pre">                         </span> AutoGenerateColumns="False"<br><span class="Apple-tab-span" style="white-space:pre">                            </span> CanUserFreezeColumns="True"<br>                             CanUserDeleteRows="True"<br>                             CanUserInsertRows="False"<br>                             ItemsSource="ChildEntities"<br>                             IsReadOnly ="True"<br>                             Grid.Row="1"<br><span class="Apple-tab-span" style="white-space:pre">                          </span> RowIndicatorVisibility="Collapsed"<br><span class="Apple-tab-span" style="white-space:pre">                         </span> IsFilteringAllowed="False" Margin="10,10,10,5" ShowGroupPanel="False"<br>                             telerik:StyleManager.Theme="Windows8Touch"<br>                             AlternationCount="2"><br>            <telerik:RadGridView.Columns><br>                <telerik:GridViewDataColumn Header="Name"  DataMemberBinding="{Binding CompanyName}" Width="*" /><br>                <telerik:GridViewDataColumn Header="Code"  DataMemberBinding="{Binding SymbolID}" Width="*" /><br>                <telerik:GridViewDataColumn Header="Change" CellTemplate="{StaticResource StockChangeTemplate}" DataMemberBinding="{Binding Change}" Width="*" /><br>                <telerik:GridViewDataColumn Header="Change Percentage" CellTemplate="{StaticResource StockChangePercTemplate}" DataMemberBinding="{Binding ChangePerc}" Width="*" /><br><br>                <telerik:GridViewDataColumn Header="Money Value" CellTemplate="{StaticResource StockMoneyValueTemplate}" DataMemberBinding="{Binding MoneyValue}" Width="*" /><br>                <telerik:GridViewDataColumn Header="Trades" CellTemplate="{StaticResource StockTradesTemplate}" DataMemberBinding="{Binding _trades}" Width="*" /><br>                <telerik:GridViewDataColumn Header="Transaction Price" CellTemplate="{StaticResource StockTransactionPriceTemplate}" DataMemberBinding="{Binding _transactionPrice}" Width="*" /><br>                <telerik:GridViewDataColumn Header="Volume" CellTemplate="{StaticResource StockVolumeTemplate}" DataMemberBinding="{Binding Volume}" Width="*" /><br>            </telerik:RadGridView.Columns><br><br>            <telerik:RadGridView.RowDetailsTemplate><br>                <DataTemplate><br>                    <StackPanel Orientation="Horizontal"<br>                        Margin="10,10,10,10"><br>                        <telerik:RadGridView x:Name="CompanyGrid"<br>                        AutoGenerateColumns="False"<br><span class="Apple-tab-span" style="white-space:pre">                         </span> CanUserFreezeColumns="True"<br>                             CanUserDeleteRows="True"<br>                             CanUserInsertRows="False"<br>                             IsReadOnly ="True"<br>                             RowIndicatorVisibility="Collapsed"<br>                             ShowGroupPanel="False"<br><span class="Apple-tab-span" style="white-space:pre">                         </span> IsFilteringAllowed="False"><br>                            <telerik:RadGridView.Columns><br>                                <telerik:GridViewDataColumn Header="Name"  DataMemberBinding="{Binding CompanyName}" Width="Auto" /><br>                                <telerik:GridViewDataColumn Header="Code"  CellTemplate="{StaticResource StockChangeTemplate}"  DataMemberBinding="{Binding SymbolID}" Width="Auto" /><br>                                <telerik:GridViewDataColumn Header="Change"  CellTemplate="{StaticResource StockChangeTemplate}" DataMemberBinding="{Binding Change}" Width="Auto" /><br>                                <telerik:GridViewDataColumn Header="Change Percentage" CellTemplate="{StaticResource StockChangePercTemplate}"  DataMemberBinding="{Binding ChangePerc}" Width="Auto" /><br><br>                                <telerik:GridViewDataColumn Header="Money Value" CellTemplate="{StaticResource StockMoneyValueTemplate}"  DataMemberBinding="{Binding MoneyValue}" Width="Auto" /><br>                                <telerik:GridViewDataColumn Header="Trades" CellTemplate="{StaticResource StockTradesTemplate}" DataMemberBinding="{Binding _trades}" Width="Auto" /><br>                                <telerik:GridViewDataColumn Header="Transaction Price" CellTemplate="{StaticResource StockTransactionPriceTemplate}"  DataMemberBinding="{Binding _transactionPrice}" Width="Auto" /><br>                                <telerik:GridViewDataColumn Header="Volume" CellTemplate="{StaticResource StockVolumeTemplate}"  DataMemberBinding="{Binding Volume}" Width="Auto" /><br>                            </telerik:RadGridView.Columns><br>                        </telerik:RadGridView><br>                    </StackPanel><br>                </DataTemplate><br>            </telerik:RadGridView.RowDetailsTemplate><br>        </telerik:RadGridView>
Mohamed
Top achievements
Rank 1
 asked on 08 Oct 2013
1 answer
46 views
Hi,
I want to change the default options behind filtering. I need to change the background colour of the Filter with my Template Colour.
Need a solution for this kind of customization.

With Thanks,
M.Vinnarasi
Dimitrina
Telerik team
 answered on 08 Oct 2013
1 answer
160 views
Hi,

Is the WPF Control example navigation (in touch mode) TileList? 

If it is, how do I lock the tiles from being moved and set headers (like A-B, C-D)

If not, what control is used for the navigation?

Yoan
Telerik team
 answered on 08 Oct 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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?