Telerik Forums
UI for WPF Forum
1 answer
152 views
Please find the sample project here

The sample application is divided into two parts:

The bottom part is similar to the RadListBox drag-n-drop demo with 4 elements:
  1. RadListBox bound to ObservableCollection<Country> CountryList
  2. RadListBox bound to ObservableCollection<Country> GroupA
  3. RadListBox bound to ObservableCollection<City> GroupD
  4. WPF ListBox bound to ObservableCollection<Country> GroupA, AllowDrop unset

The Drag-n-Drop behaviour is as expected, I can drag n drop between 1&2, but not to 3 or 4, it worked very well.

The top part is the identical setup, except it is contained within a RadTileView, and there are a few unexpected behaviours:

  1. Cursor no longer change to Cursors.No when drag over list 3 & 4
  2. When dropped on list 3, nothing happens, this is good. But when dropped on list 4 or anywhere on the tileview that's not a RadListBox, the item is removed from the drag source, and not added to anywhere.

So how do I fix these two issues?
Zarko
Telerik team
 answered on 26 Oct 2012
1 answer
97 views
Hi All,

I want create the RadGridView Control with Editable Rows. Once i Edit the GridView's last row then pressing enter should add the new row and focus should be in the First column. Can you guide me on this? Also if there is any sample please share with me...

Thansk and Regards,
Sakthi 
Dimitrina
Telerik team
 answered on 26 Oct 2012
1 answer
192 views
Hi,

How can I create shapes and connection objects not in the UI thread?
*diagram.Items.Add will be done in the UI thread...

Kind regards,
Igor
Zarko
Telerik team
 answered on 26 Oct 2012
3 answers
114 views
Hi,

I am using a class as per your Helpfile.when i use this systax as <local:CustomDragDropBehavior />    .It shows me error  as "Type not found.Verify that you are missing an assemble refernce".How to fix this Problem?

<Page x:Class="Page1"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
            xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
            mc:Ignorable="d"
            d:DesignHeight="300" d:DesignWidth="300"
            Title="Page1">
        <Grid>
        <telerik:RadGanttView x:Name="radchart" TasksSource="{Binding Tasks}" >
<telerik:RadGanttView.DragDropBehavior>
        <local:CustomDragDropBehavior />   
    </telerik:RadGanttView.DragDropBehavior>
            <telerik:RadGanttView.Columns>
                <telerik:ColumnDefinition MemberBinding="{Binding Start}" Header="Start" ColumnWidth="140">
                    <telerik:ColumnDefinition.CellEditTemplate>
                        <DataTemplate>
                            <!--<telerik:RadDateTimePicker SelectedValue="{Binding Start,Mode=TwoWay}" />-->
                        </DataTemplate>
                    </telerik:ColumnDefinition.CellEditTemplate>
                </telerik:ColumnDefinition>
                <telerik:ColumnDefinition MemberBinding="{Binding End}" Header="End" ColumnWidth="140">
                    <telerik:ColumnDefinition.CellEditTemplate>
                        <DataTemplate>
                            <!--<telerik:RadDateTimePicker SelectedValue="{Binding End,Mode=TwoWay}" />-->
                        </DataTemplate>
                    </telerik:ColumnDefinition.CellEditTemplate>
                </telerik:ColumnDefinition>
                <telerik:ColumnDefinition MemberBinding="{Binding Progress}" Header="Progress" ColumnWidth="100">
                    <telerik:ColumnDefinition.CellEditTemplate>
                        <DataTemplate>
                            <!--<telerik:RadNumericUpDown Value="{Binding Progress, Mode=TwoWay}" CustomUnit="%" Minimum="0"
                        Maximum="100" />-->
                        </DataTemplate>
                    </telerik:ColumnDefinition.CellEditTemplate>
                </telerik:ColumnDefinition>
            </telerik:RadGanttView.Columns>
        </telerik:RadGanttView>
    </Grid>
</Page>
Yana
Telerik team
 answered on 26 Oct 2012
4 answers
194 views
I am trying to draw some polygons and within the polygons I want to put information about the polygon.  

Eventually I will have multiple textblocks in the stackpanel.  I don't understand how to bind to my additional data.  I am using MVVM and my polygon binds good to Points. 

If I change the textblock to 
<TextBlock Text="Test" /> the textblock will show in the polygon with Test.  Output does not show any binding issues, it just doesn't work.  

<
telerik:RadMap x:Name="radMap" Center="49.002049,-101.367682" ZoomLevel="8" Width="1350" Height="700">
<telerik:InformationLayer x:Name="infoLayer" ItemsSource="{Binding Model.Items}">
    <telerik:InformationLayer.ItemTemplate>
        <DataTemplate>
        <telerik:MapPolygon Points="{Binding Points}" Fill="Green" >
        <telerik:MapPolygon.CaptionTemplate  >
            <DataTemplate>
                <StackPanel Background="Yellow" >
                        <TextBlock Text="{Binding SubItem}" />
                </StackPanel>
            </DataTemplate>
        </telerik:MapPolygon.CaptionTemplate>
        </telerik:MapPolygon>
        </DataTemplate>
    </telerik:InformationLayer.ItemTemplate>
</telerik:InformationLayer>
</telerik:RadMap>



Andrey
Telerik team
 answered on 26 Oct 2012
3 answers
133 views
Hi everyone,
I'm desperately trying to show a tooltip on a SplineSeriesDefinition, but it doesn't work. I've read the most of the related post but unluckily, I wasn't able to fix my problem. I have a DataSeries populated with several DataPoint. I tried to set the tooltip on every DataPoint, on the SplineSeriesDefinition and even on the SeriesMapping unsuccessfully. All that I want is a tooltip when mouse is over the curve. Please, I urgently need to fix this problem. Might someone help me, please?
Below there's the definition of the RadChart in my XAML code, and a piece of code of my CS file:

<telerik:RadChart Name="radChartCurva" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Left" Grid.Row="0" />

foreach (DatosGrafica graf in media)
                        {
                            DataPoint dp = new DataPoint(graf.valorX, graf.ValorPunto);
                            dp.Tooltip = graf.ValorPunto.ToString();
                            seriesCurva.Add(dp);
                            seriesMedia.Add(new DataPoint(graf.valorX, graf.Media));
                        }
                        seriesCurva.LegendLabel = StringResources.curve;
                        seriesMedia.LegendLabel = StringResources.average;
                        
                        SplineSeriesDefinition serieDef = new SplineSeriesDefinition();
                        SplineSeriesDefinition serieDef2 = new SplineSeriesDefinition();
                        serieDef.ShowItemLabels = false;
                        serieDef.ShowPointMarks = false;
                        serieDef.ShowItemToolTips = true;
                        serieDef2.ShowItemLabels = false;
                        serieDef2.ShowPointMarks = false;
                        serieDef2.ShowItemToolTips = true;


                        seriesCurva.Definition = serieDef;
                        seriesMedia.Definition = serieDef2;


                        SeriesMapping sm = new SeriesMapping();
                        sm.SeriesDefinition = serieDef;
                        sm.ItemMappings.Add(new ItemMapping("XValue",DataPointMember.XValue));
                        sm.ItemMappings.Add(new ItemMapping("YValue", DataPointMember.YValue));
                        this.radChartCurva.SeriesMappings.Add(sm);
                        this.radChartCurva.DefaultView.ChartArea.DataSeries.Add(seriesMedia);
                        this.radChartCurva.DefaultView.ChartArea.DataSeries.Add(seriesCurva);

What's wrong with my code?

Thanks in advance guys :-)
Davide
Top achievements
Rank 1
 answered on 26 Oct 2012
3 answers
189 views
we've tried implementing a radgridview which synchronizes with a data form thru element binding within a backstage item of the ribbonview and found it now working. so we tested a simple textbox to textblock element binding and it still does not work.

something like this:

<telerikRibbon:RadRibbonBackstageItem Header="Recent" IsDefault="True">
     <StackPanel Margin="15 15 0 0">
          <TextBlock Text="{Binding ElementName=testtext, Path=Text}"/>
          <TextBox x:Name="testtext" />
     </StackPanel>
</telerikRibbon:RadRibbonBackstageItem>

we are using the Q2 version if it helps.

thanks
Pavel R. Pavlov
Telerik team
 answered on 26 Oct 2012
6 answers
263 views
Hi,

In one of my projects,I use WCF data services for querying the database,and use GridView, and DataForm for viewing and editing data.When the user double click on a row, I create a filtered DataServiceQuery (e.g. ID=55) and use it to initialize a QueryableDataServiceCollectionView<T> which I then assign to the RadDataForm ItemsSource.I can successfully add ,delete, and edit records by calling SubmitChanges() on the ItemsSource (which is of type QueryableDataServiceCollectionView<T>),
 but I am facing other difficulties:

1-I have an entity Sim which has a 1 to many association property called Installations. When clicking Cancel while editing or inserting in the DataForm, I get the following error which seems to be caused by the DataForm trying to set a value on the Installations property.

Setting an instance of DataServiceCollection to an entity property is disallowed if the instance is already being tracked. Error occurred on property 'Installations' for entity type 'TDS.DeviceManagementDataService.Sim'.


2-When I open an existing record for editing,and click the 'insert' button,fill-in the form,and click save,the record is saved but the form goes back and display the record that was being edited earlier.

My last question is: what is the best way of databinding a RadDataForm when working with WCF data service ?

GridView Double Click Code:

private void SimsGridView_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {          
            SimView view = new SimView();
            QueryableDataServiceCollectionView<Sim> dataContext = new Telerik.Windows.Data.QueryableDataServiceCollectionView<Sim>(db, db.Sims.Where(i => i.ID == SimsGridView.GetSelectedItem<Sim>().ID).ToDataServiceQuery<Sim>());
            dataContext.PageSize = 100;
            dataContext.AutoLoad = true;
            view.DataContext = dataContext;
            view.Show();
            view.Focus();
            
        }

SimView Window:

<telerik:RadDataForm x:Name="rdfSim" ItemsSource="{Binding}" AutoGenerateFields="False"  HorizontalAlignment="Stretch"  VerticalAlignment="Stretch"
            ReadOnlyTemplate="{StaticResource MyTemplate}" NewItemTemplate="{StaticResource MyTemplate}"
                                 EditTemplate="{StaticResource MyTemplate}" EditEnded="rdfSim_EditEnded"
                                  CommandButtonsVisibility="All"   ValidatingItem="rdfSim_ValidatingItem" DeletedItem="rdfSim_DeletedItem">         
 
        </telerik:RadDataForm>



Thanks in advance

Madani
Chris
Top achievements
Rank 1
 answered on 26 Oct 2012
5 answers
274 views
I am using RadGridView for WPF 2012.3.1017.40

There is some issue with the column header depending on the type of XAML I invoked

When I use:
<telerik:GridViewDataColumn UniqueName="Year"  Header="Year" />
The grid does persists with the expected header "Year"

However when I use:
<telerik:GridViewDataColumn UniqueName="Year" >
                    <telerik:GridViewDataColumn.Header>
                        <TextBlock Text="Year" />
                    </telerik:GridViewDataColumn.Header>
                </telerik:GridViewDataColumn>

The following is injected into the persisted XML
    <PV Key="12" TypeKey="-664072138">
      <Value xsi:type="xsd:string"<System.Windows.Controls.TextBlock</Value>
    </PV>
and instead of "Year" in the Column header the grid persists the words "System.Windows.Controls.TextBlock" into the header instead.

Please note, it appears to be an extra < being injected within the value element. However I need the word "Year" instead.

How can I fix this?
Thank you,
Alan Painter
Dimitrina
Telerik team
 answered on 26 Oct 2012
4 answers
268 views

A part of a table shows the following datas:

[picture1.png]

The quick filter (Funnel Icon) doesn’t show all the values from the selectable items.

[picture2.png]

 

It seems well in the list, that the numbers are in ascending order, but more than one value which is in the table is missing from it (eg. ’-0,49’ or ’6,00’in the upper picture), and more than one value is duplicated (eg. ’-8,51’).

Informations and source code:

<Style x:Key="RightAlignedGridColumnStyle" TargetType="{x:Type telerik:GridViewDataColumn}">

      <Setter Property="TextAlignment" Value="Right"/>

</Style>

<Style x:Key="PercentGridColumnStyle" TargetType="{x:Type telerik:GridViewDataColumn}"

         BasedOn="{StaticResource ResourceKey=RightAlignedGridColumnStyle}">

      <Setter Property="DataFormatString" Value="{}{0:N2}"/>

</Style>

 

<telerik:GridViewDataColumn Width="185" Header="Low pr % to Normal pr orig"

     DataMemberBinding="{Binding LowPriceToEDLPOriginal}"

     Style="{StaticResource ResourceKey=PercentGridColumnStyle}">

</telerik:GridViewDataColumn>

 

  • LowPriceToEDLPOriginal: Receive from database, with not only two, but three digits after the decimal. Presumably the duplications occur because of this, because there is a ‘-8,511’ and a ‘-8,512’ value in the database.

 

 

Is there any solution for our problem? Thank you for your answer!

 

Attila Pados
Top achievements
Rank 1
 answered on 26 Oct 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
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
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?