Telerik Forums
UI for WPF Forum
0 answers
587 views
Hello telerik team. I have problem with CellEditTemplate navigation. I have GridViewDataColumn with RadMaskedNumericInput CellEditTemplate:
<telerik:GridViewDataColumn Name="RateColumn" DataMemberBinding="{Binding Rate,Mode=TwoWay}"
                          Header="{x:Static properties:Resources.CurrencyRateHeader}" DataFormatString="{} {0:#########0.00000000}">
                        <telerik:GridViewDataColumn.CellEditTemplate>
                            <DataTemplate>
                                <controls:RadMaskedNumericInput InputBehavior="Insert" Value="{Binding Rate, Mode=TwoWay}"
                                                                IsClearButtonVisible="False" Mask="##.########" FormatString="########00.00000000"
                                                                SpinMode="PositionAndValue"
                                                                UpdateValueEvent="PropertyChanged"
                                                                SelectionOnFocus="SelectAll"
                                                                KeyboardNavigation.TabNavigation="Local"
                                                                HorizontalAlignment="Stretch"
                                                                />
                            </DataTemplate>
                        </telerik:GridViewDataColumn.CellEditTemplate>
 
                    </telerik:GridViewDataColumn>

The problem is in navigation: when i'm ending editing of this cell i cannot navigate to the next row's cell on hitting enter button. Navigation work's only with Tab button. How can i achieve desired result?
Alex Suutri
Top achievements
Rank 1
 asked on 28 Feb 2013
5 answers
409 views
Hello, the problem is such DataDrid to create a context menu, but it has a function of interaction with the selected row, so that when one line is highlighted, and we click the right mouse button on the 2, the context menu appears for the selection, that is, for one. Need to by pressing the right button on the DataGrid stood Item and its context menu. Tell me how to implement this.
Владимир
Top achievements
Rank 1
 answered on 28 Feb 2013
1 answer
91 views
Hi Telerik,

is it possible to have multiple zooms in a chart with multiple y-axes? (for each Y axis it's own zoom)


Greetings Uwe
Peshito
Telerik team
 answered on 28 Feb 2013
3 answers
75 views
I'm trying to use the RadGridView control for a WPF app (.NET 4.5). We've got a WCF service which runs a SQL query that looks at 2 tables in 1 database, and a third table in a secod database. The WCF service returns all of the results. The results include things like client number, case number, client's first and last names, date of birth, etc. We want to group the results by the client number, and that's easily done, but what we also want to do is display things like the client's first and last name, DOB, etc in the group header. Clearly, however, we don't want to group by the client's name, or DOB, etc. Only by the client number (the case number does change from one record to the next and some other fields do too, but aren't relevant to this discussion).

My question is a simple one, is it possible to put into the group header data that isn't a part of the group, like client's first and last name, DOB, etc? If so, how is that done. But if not, then how do we get the data in a way that the RadGridView will display it the way we need it displayed?
Vlad
Telerik team
 answered on 28 Feb 2013
0 answers
125 views
Hi,
I'm trying to use the GridView export to *whatever format*, and they all seem to work fine, except the export to Text. I tried using your demo online, and that gave me the same problem. When I save it, it saves as a .doc (I also tried with .docx), and then the file is naturally saved to my drive as that format. However when I open it, it tries to open in a browser (in my case IE), and throws an error and won't open. First of all, have you seen this before, and secondly why would it try to open in a browser? Shouldn't it just be Word?

Thanks,
Ryan
Lars
Top achievements
Rank 1
 asked on 27 Feb 2013
1 answer
191 views
Hi,

Can I override default editortemplate for properties?

I would like to use TextBox instead of TextBlock on properties, that are readonly (like in VS2012
I'm using autogenerated scenarios.

I guess setting editortemplate explicitly in propertydefinition will override editortemplateselector logic as well, which is not desired behaviour
Daniel
Top achievements
Rank 1
 answered on 27 Feb 2013
1 answer
137 views
Hi, 

I am trying to display company revenue by product using AreaSeries and SeriesMapping. But unfortunately
I don't know how to set CombineMode in SeriesMapping way. Could you please provide an example? 

private
void SetMappings(RadChart chart)
{
    SeriesMapping seriesMapping = new SeriesMapping() { ChartAreaName = "MyChartArea" };
    seriesMapping.SeriesDefinition = new AreaSeriesDefinition();
 
    //=============================================//
    ItemMapping itemMapping = new ItemMapping();
    itemMapping.DataPointMember = DataPointMember.YValue;
    itemMapping.FieldName = "Rev";
 
    ItemMapping itemMapping2 = new ItemMapping();
    itemMapping2.DataPointMember = DataPointMember.XValue;
    itemMapping2.FieldName = "Date";
 
    seriesMapping.ItemMappings.Add(itemMapping);
    seriesMapping.ItemMappings.Add(itemMapping2);
 
    chart.SeriesMappings.Add(seriesMapping);
}

<telerikChart:RadChart x:Name="RadChart1" UseDefaultLayout="False">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"></RowDefinition>
                <RowDefinition Height="*"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
            </Grid.ColumnDefinitions>
 
            <telerikCharting:ChartTitle Grid.ColumnSpan="2" Content="Chart Title"></telerikCharting:ChartTitle>
 
            <telerikCharting:ChartArea Grid.Row="1" x:Name="MyChartArea" LegendName="MyLegend" Margin="-1,1,1,-1"  />
            <telerikCharting:ChartLegend Grid.Row="1" Grid.Column="1" x:Name="MyLegend"></telerikCharting:ChartLegend>
        </Grid>
    </telerikChart:RadChart>


Thanks!
Evgenia
Telerik team
 answered on 27 Feb 2013
1 answer
175 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
196 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
148 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
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
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?