Telerik Forums
UI for WPF Forum
1 answer
118 views
Hi, 

I need make big the RadDiagramShape of relative form. I want to say that, if the shape is a rectangle of 100x100 and you make it bigger, the new size is 200x200, not 100x200. It's possible do it? How I do?

Thanks, 

Maite.
Martin Ivanov
Telerik team
 answered on 17 Jul 2014
1 answer
289 views
Hi, 

several properties of the object attached to my RadPropertyGrid are of a custom type "DPDouble", which wraps some functionality around a double value.
In order to show and edit properties of this type in the Grid, I have implemented a custom type editor DPDoubleEditorNew which is called like this:

01.void RequestEditors(object sender, Telerik.WinControls.UI.PropertyGridEditorRequiredEventArgs e)
02.{
03.    PropertyGridItem item = e.Item as PropertyGridItem;
04.    if (item.PropertyType == typeof(DPDouble))
05.    {
06.        e.EditorType = typeof(DPDoubleEditorNew);
07.    }
08. 
09.}



And the editor is based on this code:

   public class DPDoubleEditorNew : BaseTextBoxEditor
{
 
    private DPDouble internalvalue;
 
    public override object Value
    {
        get
        {
           
            BaseTextBoxEditorElement element = this.EditorElement as BaseTextBoxEditorElement;
             
            double myval;
            if(double.TryParse(element.Text,out myval))
            {
                internalvalue.SetValueAuto(myval);
            }
             
            return internalvalue;
        }
        set
        {
             
            internalvalue = (DPDouble)value;
            base.Value = internalvalue;
        }
    }
 
}


Basically you see that I keep a pointer to the DPDouble object and when the editor is done I use the SetValueAuto as setter function.
This works fine, but although the bound object subscribes to INotifyPropertyChanged interface, and I raise the PropertyChanged event in the SetValueAuto setter function, my grid seems unable to catch the event.

My object has the following event

public event PropertyChangedEventHandler PropertyChanged;
 
    public void RaisePropertyChanged(String info)
    {
        if (PropertyChanged != null)
        {
            PropertyChangedEventArgs args = new PropertyChangedEventArgs(info);
            PropertyChanged(this, args);
        }
    }


The RaisePropertyChanged gets called, but although my grid subscribes to the PropertyChanged event 

PropertyGrid.PropertyChanged += new PropertyChangedEventHandler(PropertyGrid_PropertyChanged);

the handler is never called.
It seems like the INotifyPropertyChanged is notifying somebody else than my grid.

Do you have any suggestions?
Yoan
Telerik team
 answered on 17 Jul 2014
5 answers
132 views
I have a chart with several data series (types BarSeriesDefinition and StepLineSeriesDefinition, see attachment). The x-axis holds discrete DateTime values in a monthly interval.

I have the following issue:
The step line data points are located in the centre of the x-axis data points (e.g. the red step line changes its y-axis value for february at the position of the blue bar, which is in the centre of the x-axis data point.).

I need the step line data points to be located at the beginning of the x-axis data points instead of the centre.

I create the data series dynamically in code behind, simplified e.g:

// Create mapping.
SeriesMapping newMapping = new SeriesMapping();
  
// Create series definition.
StepLineSeriesDefinition series = new StepLineSeriesDefinition();
newMapping.SeriesDefinition = series;
  
newMapping.ItemsSource = items;
newMapping.ItemMappings.Add(new ItemMapping(xAxisCategoryKey, DataPointMember.XCategory));
newMapping.ItemMappings.Add(new ItemMapping(yAxisKey, DataPointMember.YValue));
  
// Add mapping to chart.
this._radChart.SeriesMappings.Add(newMapping);

Is there a solution for this problem (I am quite new to wpf and telerik)?

Thanx for ur help

Johannes
Peshito
Telerik team
 answered on 17 Jul 2014
11 answers
209 views
I am using the ADOMD data provider to connect to a SQL Server 2014 Analysis server and I only want certain records to be returned. I have a field called "accnt" which is a string (varchar) field on a dimension in the cube on SQL server. The CUBE may have several thousand different accounts and I want to only to be able to see certain records (e.g. 1 or more specific accounts). I have the following code where I am trying to only get account which has a value of "ABC" in it. Following the documentation I came up with the following however it does nothing irrespective of what I put in the condition.Comparison or the member name. Can someone giv e me an example of how this should be formatted - thank you
.
01.OlapSetCondition condition = new OlapSetCondition();
02.                   condition.Comparison = Telerik.Pivot.Core.Filtering.SetComparison.DoesNotInclude;
03.                   condition.Items.Add("[accnt].&[ABC]");
04.                   AdomdFilterDescription filterDescription = new AdomdFilterDescription();
05.                   filterDescription.MemberName = "[accnt]";
06.                   filterDescription.Condition = condition;
07. 
08.                   pivot.AdomdDataProvider.BeginInit();
09.                   pivot.AdomdDataProvider.FilterDescriptions.Add(filterDescription);
10.                   pivot.AdomdDataProvider.ConnectionSettings = connectionSettings;
11. 
12.                   pivot.AdomdDataProvider.EndInit();
13.                   pivot.MainGrid.DataProvider = pivot.AdomdDataProvider;
14.                   pivot.FieldList.DataProvider = pivot.AdomdDataProvider;
Rosen Vladimirov
Telerik team
 answered on 17 Jul 2014
7 answers
355 views
Hey,

I have a NumericUpDown control where Maximum value is set to 39 and Minimum value is set to -39. What im trying to achieve is to show a dialog window when a user has entered more than 39 as value or more than -39 as value and pressed "Enter", for example the value 89. I also have a ValueChanged event where when i debug it, i can see it has a Dependency property called ContentText which works fine for positive numbers but not for negative numbers. For example if i have entered 5555 the ContentText shows the number but if i have entered -5555 the ContentText shows -39 or any other negative number above -39 makes it go back to -39 where it should have shown the current value entered.

Is this a Telerik bug?.

Thanks.
Konstantina
Telerik team
 answered on 16 Jul 2014
1 answer
127 views
A RadGridView's Row is bound to a RowObject derived from DynamicObject.  Columns data are added to the grid.  Each cell is editable. Within the RowObject based on DynamicObject copies of the original data and the modified data is kept, along with information indicating whether modified data or original data is displayed for the cell. The edited value is added to the RadGridView's bound object RowObject and cause the bindings to change for edited cells. and the bindings are then controlled through RadioButtons.  A converter is used to get the data from the collection of DynamicObject's. 

The call to ElementExporting is not aware of the binding changes and exports original data when user is trying to export modified data.  Therefore, I am trying to get the bindings for the cell in ElementExporting to acquire the correct data or is the ElementExporting function capable of using the converter.  The bindings are changed when data is modified in the cell. 

On a cell by cell basis, is it possible within the ElementExporting function to get the binding of a cell to be able to display either the original data or the modified data that is currently displayed on the grid?


Yoan
Telerik team
 answered on 16 Jul 2014
6 answers
847 views
Hello,

I have a Grid that displays a start and end time for each day of the week.  The column headers must include the Date and DayOfWeek formatted basically like this: ...ToString("ddd M/d")

I'm not sure how I go about setting the Binding property.  Here's what I have just using hard coded values but really, I need these to be bound to the view model (and not StaticResource either because if the user chooses a different week, then those values must update).

        <telerik:RadGridView Grid.Row="1" Margin="10" Name="radGridViewScheduleLines" ItemsSource="{Binding ScheduleLines}" AutoGenerateColumns="False" IsFilteringAllowed="False" ShowGroupPanel="False"
            <telerik:RadGridView.Columns> 
                <telerik:GridViewDataColumn DataMemberBinding="{Binding TeamMemberName}" Header="Team Member" CellStyle="{StaticResource TeamMemberColumnStyle}" IsSortable="False" /> 
                <telerik:GridViewDataColumn DataMemberBinding="{Binding JobCode}" Header="Code" IsSortable="False" /> 
                <telerik:GridViewComboBoxColumn DataMemberBinding="{Binding SundayStartDaySegment, Mode=TwoWay}" IsSortable="False" ItemsSource="{Binding DaySegments}" DisplayMemberPath="DisplayStart" Width="50"
                    <telerik:GridViewComboBoxColumn.Header> 
                        <StackPanel> 
                            <TextBlock Text="Sun 2/28 Start"  
                                       TextWrapping="Wrap"/> 
                        </StackPanel> 
                    </telerik:GridViewComboBoxColumn.Header> 
                </telerik:GridViewComboBoxColumn> 
                <telerik:GridViewComboBoxColumn DataMemberBinding="{Binding SundayEndDaySegment, Mode=TwoWay}" IsSortable="False" ItemsSource="{Binding DaySegments}" DisplayMemberPath="DisplayEnd" Width="50"
                    <telerik:GridViewComboBoxColumn.Header> 
                        <StackPanel> 
                            <TextBlock Text="Sun 2/28 End"  
                                       TextWrapping="Wrap"/> 
                        </StackPanel> 
                    </telerik:GridViewComboBoxColumn.Header> 
                </telerik:GridViewComboBoxColumn> 
                <telerik:GridViewComboBoxColumn DataMemberBinding="{Binding MondayStartDaySegment, Mode=TwoWay}" IsSortable="False" ItemsSource="{Binding DaySegments}" DisplayMemberPath="DisplayStart" Width="50"
                    <telerik:GridViewComboBoxColumn.Header> 
                        <StackPanel> 
                            <TextBlock Text="Mon 3/1 Start"  
                                       TextWrapping="Wrap"/> 
                        </StackPanel> 
                    </telerik:GridViewComboBoxColumn.Header> 
                </telerik:GridViewComboBoxColumn> 
            </telerik:RadGridView.Columns> 
        </telerik:RadGridView> 

See the pattern?  How do I go about making the date part of the Text in the TextBlock bound to something?  I was thinking I'd just have a property hanging off the ViewModel - one for each day and each Start/End column called MondayStartHeader, MondayEndHeader, etc. That won't work though because the grid is bound to a collection of objects on the ViewModel.

Thanks.


Rohan
Top achievements
Rank 1
 answered on 16 Jul 2014
1 answer
136 views
If you look at the attached image of the pivot grid you see a 2 line heading. On the 1st line of the heading I want to center the heading in the 1st line over the corresponding cells of the 2nd line (i.e. centered over 2 Columns as I have shown in the column heading "Sum Of fcOpnClr") - is this possible? and if so I do I do it. - Thanks
Kalin
Telerik team
 answered on 16 Jul 2014
1 answer
197 views
Hi,

I am using MVVM for RadDiagram control. I want to customize the connectors of the shapes, so that I can manage where the links are attached to. For shapes I use a ViewModel class which is derived from NodeViewModelBase and for links I use LinkViewModelBase<NodeViewModelBase>. How or on which layer should I manage the custom connectors? And how or where should I define them?

Thanks in advance,

Semih
Zarko
Telerik team
 answered on 16 Jul 2014
1 answer
110 views
I have a GridView bound to a DataTable. The DataTable contains columns with 'integer' names. e.g. "2000", "2014" etc.

When I try to edit a cell in the GridView, I'm shown an error: Cannot find column 2000.

I suspect this is because the column name is parsing to an int somewhere internally. When I change to column name to something like "x2000" then it works fine.

Are there any workarounds for this?
Yoan
Telerik team
 answered on 16 Jul 2014
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
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
SplashScreen
Rating
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
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?