Telerik Forums
UI for WPF Forum
1 answer
159 views
Hello everyone,

as far as I my investigation has led me so far, Telerik controls don't support runtime localization (no mater how I poked them :)). I've read a tutorial on localization http://www.telerik.com/help/wpf/common-localization.html and successfully localized our app if the culture is set at startup time as described.

I have a really strict requirement of supporting language change at runtime because international operators will be using the app at the same time. Our system controls important equipment and total load time of application varies between 5-10 minutes, even on high-end server machines. Figures, reloading an entire app to switch a bunch of strings is not an option.

I'm even open to hacks if necessary to make this work. I've found a little hack on Silverlight forum (http://www.telerik.com/community/forums/silverlight/gridview/change-language-of-localization-of-radgridview-at-runtime.aspx) but it didn't work for RadCartesianChart.

All ideas are welcome. Thanks in advance.
Petar Kirov
Telerik team
 answered on 27 Feb 2013
4 answers
175 views
Hi,
This is my first encounter with Telerik Grid, and i am facing a seemingly simple problem. I have a bound Grid, and I add some GridViewDataColumn which are unbound. Using GridViewDataColumn has it's reasons, as i need to have the option of filtering, grouping and sorting with these.
I am trying to fill these columns in RowLoaded event, as it seems suitable due to row virtualization, but e.Row only offers bound cells. My 3 unbound columns are not accessible.

For each row I also need access to the data item, the row is bound to, because using this I fill these columns.

Is this or similar thing is possible in telerik wpf RadGridView ?                        version 2012, Q2

Exclude the wrapper based or ViewModel based solutions, those are not possible.
Thanks and regards
Syed Saqib Ali
Top achievements
Rank 1
 answered on 27 Feb 2013
4 answers
135 views
Hi

Very odd situation. I have a simple line chart (see code below) which has e.g. 100 data points. I'm using XValue on the X axis and doing ranging myself (AutoRange=false). The X values are integers but I manually override the string values for the TickPoints' Label with the actual strings I need to display for each (in general the strings cannot be determined using a format pattern). In the chart's SizeChanged event I recalculate the Step/LabelStep/MinorTickPointMultiplier etc. values each time so that things are spaced nicely (only the Step part of the calculation is shown below).

Now, if there aren't too many data points then it works perfectly and the Label string values are always shown. 

But once I exceed say 70 data points, then as I resize the form slowly (to check that it's Step calculations look OK all the way) sometimes the Label values are shown (attached image 1) and sometimes the underlying TickPoint.Value number is shown instead (image 2). It seems at some specific points it flips from the one to the other (repeatably). I checked via a breakpoint and the Labels are always getting set. It is, as if the Tick Points are being reset again afterwards.

I just cannot figure out what else is happening behind the scenes....

Here's a small example that demonstrates (just create a WPF form with a chart and attach chart's SizeChanged event)

        private void SetupChart()
        {
            // some data to visualise...
            // NB: need a reasonable number of points, doesn't exhibit at low numbers
            var data = new DataTable();
            data.Columns.Add("x", typeof(int));
            data.Columns.Add("y", typeof(double));
            var date = new DateTime(2012, 1, 1);
            var rnd = new Random();
            for (var i = 0; i < 100; i++)
            {
                var row = data.NewRow();
                row["x"] = date.Year * 12 + date.Month - 1;     // integer value calc'd so that 1st of month is evenly spaced (see UpdateLabels() below)
                row["y"] = 50 + rnd.NextDouble() * 10;
                data.Rows.Add(row);
                date = date.AddMonths(1);
            }
 
            // just set up a basic line chart for testing purposes...          
            chart.DefaultView.ChartLegend.Visibility = System.Windows.Visibility.Collapsed;
            chart.DefaultView.ChartArea.EnableAnimations = false;
            chart.DefaultView.ChartArea.AxisY.StripLinesVisibility = System.Windows.Visibility.Collapsed;
            chart.DefaultView.ChartArea.AxisX = new AxisX();
            chart.DefaultView.ChartArea.AxisX.LayoutMode = AxisLayoutMode.Auto;
            chart.DefaultView.ChartArea.AxisX.StripLinesVisibility = System.Windows.Visibility.Collapsed;
            chart.DefaultView.ChartArea.AxisX.AutoRange = false;
            chart.DefaultView.ChartArea.AxisX.MinValue = data.Rows.Cast<DataRow>().Min(r => (int)r["x"]);
            chart.DefaultView.ChartArea.AxisX.MaxValue = data.Rows.Cast<DataRow>().Max(r => (int)r["x"]);
            var mapping = new SeriesMapping();
            mapping.ItemsSource = data;
            mapping.ItemMappings.Add(new ItemMapping("x", DataPointMember.XValue) { FieldType = data.Columns["x"].DataType });
            mapping.ItemMappings.Add(new ItemMapping("y", DataPointMember.YValue) { FieldType = data.Columns["y"].DataType });
            mapping.SeriesDefinition = new LineSeriesDefinition();
            chart.SeriesMappings.Add(mapping);
 
            // to force initial ranging calc to occur...
            chart_SizeChanged(null, null);
        }
 
 
 
        /// <summary>
        /// Event handler
        /// </summary>
        private void chart_SizeChanged(object sender, SizeChangedEventArgs e)
        {
            if (e == null || e.WidthChanged)
            {
                RecalcRange();
                UpdateLabels();
            }
        }
 
 
 
        /// <summary>
        /// Event handler
        /// </summary>
        private void updateLabelsButton_Click(object sender, RoutedEventArgs e)
        {
            // manual force recalculate of the labels
            UpdateLabels();
        }
 
 
 
 
        private void RecalcRange()
        {
#if true
            // pick a reasonable step value...
            var width = chart.DefaultView.ChartArea.ActualWidth;
            var range = chart.DefaultView.ChartArea.AxisX.MaxValue - chart.DefaultView.ChartArea.AxisX.MinValue;
            var step = Math.Max(1, (int)Math.Ceiling(range * chart.DefaultView.ChartArea.AxisX.TicksDistance / width));
            chart.DefaultView.ChartArea.AxisX.Step = step;
#else
            // it happens for certain constants, such as 8 (but not for 9 etc)...
            chart.DefaultView.ChartArea.AxisX.Step = 8;
#endif
        }
 
 
 
        private void UpdateLabels()
        {
            foreach (var tickPoint in chart.DefaultView.ChartArea.AxisX.TickPoints)
            {
                // Reconstitutes the date string for the label from the integer value in x column..
                var dt = new DateTime((int)tickPoint.Value / 12, ((int)tickPoint.Value % 12) + 1, 1);
                tickPoint.Label = dt.ToString("MMM-yy");
            }
        }
Petar Kirov
Telerik team
 answered on 27 Feb 2013
8 answers
182 views
Is it possible to show DataAnnotation validation error on property not shown on the GridView? Maybe at the row level.  I want to show that the selected item cannot be deleted.
Alex Martin
Top achievements
Rank 1
 answered on 27 Feb 2013
1 answer
107 views
I like the sample Menu Customization in with reference WPF Demo however the sample focus only on the display. How would I got about adding Command binding to this sample?  

If I add a Command property of type ICommand to your MenuItemViewModel and can't bind to the newly added property since the MenuItemViewModel is not a Dependency object.  

Any suggestion?
Rosen Vladimirov
Telerik team
 answered on 27 Feb 2013
4 answers
342 views
WPF - V2012.3.1224.40 - VS2010

Hello,

I have programmatically added one table in another:

Table l_Table = new Table();
l_Table.LayoutMode = TableLayoutMode.AutoFit;
ownerSection.Blocks.Add(l_Table);
 
foreach (IFeatureViewModel l_Node in treeViewModel.Nodes)
{
    TableRow l_Row = new TableRow(); l_Table.Rows.Add(l_Row);
 
    Table l_InnerTable = new Table();
    l_InnerTable.LayoutMode = TableLayoutMode.AutoFit;
 
    TableCell l_InnerCell = new TableCell(); l_Row.Cells.Add(l_InnerCell);
    l_InnerCell.Borders = new TableCellBorders(0.5f, BorderStyle.Single, System.Windows.Media.Colors.Red);
    l_InnerCell.Blocks.Add(l_InnerTable);
 
    TableRow l_InnerRow = new TableRow(); l_InnerTable.Rows.Add(l_InnerRow);
 
    ....

The outer table cells have red borders and inner table cells have gray borders (see attached image).

After the inner table there is a vertical space.
How to remove this space ?

Thanks
Stephane

Stéphane
Top achievements
Rank 1
Iron
 answered on 27 Feb 2013
3 answers
74 views
I've noticed that the SDKSamples directory is no longer in the WPF source code drop as of the 2013 Q1 release.  Has that been moved to a separate download?  For some reason, I'm not seeing it anywhere..

Thanks, Dan
Vlad
Telerik team
 answered on 27 Feb 2013
9 answers
250 views

I created custom RadDataFilter , which contains dropdown list. DropDown List is OK. Now here is new requirement, I want to add telerik DateTimePicker.  DateTimePicker Bind successfully, problem is that I can’t get selected date value. Therefore FilterDesripter.value is not set.

For Combobox here is template

<DataTemplate x:Key="ComboBoxEditor">

            <telerik:RadComboBox  SelectedValue="{Binding Value, Mode=TwoWay, FallbackValue=null}"    MinWidth="100" />

        </DataTemplate>

 

But how I’ll set selectedDate Value, here is my Code.

 <DataTemplate x:Key="DateTimeEditor">

      < telerik:DatePicker MinWidth="100" SelectedDate="{Binding Value}"></my:DatePicker>

 </DataTemplate>

Rossen Hristov
Telerik team
 answered on 27 Feb 2013
1 answer
215 views
Hello,
      I use ComboBox disabled to display the data, and I want to change the appearance of ComboBox disabled, which make it look like a TextBox disabled.  Could you give me any solution to achieve the feature?

Thanks & Best Regards
James
Masha
Telerik team
 answered on 27 Feb 2013
3 answers
232 views
Hey,

I'm using and GanttView and looking for a way to use the available space dynamically. At the moment you can specify how much time is displayed and scale the time per pixel ratio (PixelLength). It would be nice to have a way of setting time/pixel to auto, so that it displays the whole visible range in the timeline part of the control.

At the moment I could only get this working by doing some kind of calculation. I need to get the RenderSize of the whole control subtract the fixed columns width to get the remaining space. Finally I have to divide VisibleRange's ticks by this number, to get the scaling right. This is not that heavy calculation but it would be cool if you could add that possibility to the component. Especially as you are forced to fix the column's size! I think there is more than one person, who would like that to be implemented.

Thank you in advance.

Best regards,
Peter Schmidt
Yana
Telerik team
 answered on 27 Feb 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
PersistenceFramework
DataPager
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?