Telerik Forums
UI for WPF Forum
0 answers
89 views

Hi Telerik Team,

    I want to open a Telerik:Raddocking in a popup on Button Click. And button are there in toolbar. can you please provide a sample example to achieve that thing. i am attaching the image when i click on that button then the copy of the given raddocking will open in a new pop as well.

Regards

Raju

Raju
Top achievements
Rank 1
 asked on 09 Aug 2017
4 answers
199 views

Hi Telerik,

 

I have a RadGridView with some Columns and 2 ColumnGroups. Each ColumnGroup has 2 Columns.

I want to know if is it possible to "merge" 2 child Columns Header in each ColumnGroup and display the Header ColmunGroup parent. Finally, there is just 1 row, with Column Header and ColumnGroup Header inside.

 

I attached 2 screens to show you the actually result and the objective.

 

Thank you !

Stefan
Telerik team
 answered on 09 Aug 2017
1 answer
147 views

hello!

I use ExpressionEditor in a project ,the main code is: 

xaml:

 <TextBox x:Name="aaa"/>
<telerik:RadExpressionEditor Grid.Row="1" x:Name="ExpressionEditor"
ExpressionChanged="ExpressionEditor_ExpressionChanged"
ExpressionText="Sin(100)" />

 

cs:

private void ExpressionEditor_ExpressionChanged(object sender, RadRoutedEventArgs e)
        {
            try
            {
                dynamic dynamicExpression = ExpressionEditor.Expression;
                dynamic compiledExpression = dynamicExpression.Compile();
                object executionResult = compiledExpression();
                aaa.Text = executionResult.ToString();
            }
            catch
            {

            }
            
        }

 

the TextBox can show the result,but result preview of the RadExpressionEditor did not show the result,why? what should I do?

by the way,can we improve the RadExpressionEditor to make the programmer can  add custorm function or constants like Pi?

Wang
Top achievements
Rank 1
 answered on 09 Aug 2017
1 answer
316 views
Hi,

I'm new to telerik products and this is a really simple question that I'm trying to find right now.  I'm currently generating a letter pdf using a method that returns a RadFixedDocument, which is made up of multiple Blocks placed in different positions of a single page using a FixedContentEditor.  Right now I need to convert specific text fragments of the letter string to bold (ones that are wrapped in bold tags) before converting to pdf, but I haven't been able to find a way to separate bold from non-bold text besides using Blocks.  Is there an easier way to do this just with UI for WPF?

Thanks,

Will
Tanya
Telerik team
 answered on 08 Aug 2017
6 answers
121 views
I found that DataFormDataField.ContentTemplate doesn't work since version "RadControls for WPF Q2 2013",  actually i only have the latest 3 versions. I've tried each one, all the same, just display the default textbox. My code is simple, just copy from your online documentation, as below:
     <Grid x:Name="LayoutRoot" Background="White">
            <Grid.Resources>
                <DataTemplate x:Key="MyTemplate">
                    <StackPanel Orientation="Horizontal" >
                        <telerik:DataFormDataField>
                            <telerik:DataFormDataField.LabelTemplate>
                                <DataTemplate>
                                    <Label Foreground="Orange">Title:</Label>
                                </DataTemplate>
                            </telerik:DataFormDataField.LabelTemplate>
                            <telerik:DataFormDataField.ContentTemplate>
                                <DataTemplate>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBox Text="25" Margin="0,0,10,0" />
                                        <TextBlock Text="years" Foreground="Green" VerticalAlignment="Bottom" />
                                    </StackPanel>
                                </DataTemplate>
                            </telerik:DataFormDataField.ContentTemplate>
                        </telerik:DataFormDataField>
                    </StackPanel>
                </DataTemplate>
            </Grid.Resources>
            <telerik:RadDataForm x:Name="DataForm1"
                           AutoGenerateFields="False" 
                           ReadOnlyTemplate="{StaticResource MyTemplate}">
            </telerik:RadDataForm>
        </Grid>

MOST URGENT, PLEASE ANSWER IT QUICKLY, THANK YOU!!
Yoan
Telerik team
 answered on 08 Aug 2017
4 answers
309 views

I have a RadCartesianChart defined in XAML with multiple series. Each series has the ItemsSource, HorizontalAxis, VerticalAxis and Visibility bound to MVVM model properties. The ChartView itself has the DataContext bound inherently from the DataContext of my chartviewer usercontrol's DataContext.

When my control is first displayed, everything works as expected, the chart is displayed correctly and I can switch through the different series with different data and different label formats.

The chartviewer control is part of a ContentControl which picks the relevant View from the assigned DataContext type. This is switched depending on user input.

Firstly, if I navigate away from the chartviewer control I have to use the following code to prevent a "Cannot modify the logical children for this node at this time because a tree walk is in progress" exception from the ChartView:-

private void ChartViewer_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
{
      if (e.NewValue == null)
      {
            chartCart.DataContext = null;
            chartCart.UpdateLayout();
      }
}

Secondly if I then go back to the ChartViewer reusing he same MVVM model that was previously used, the ChartView now show "HorizontalAxis not set" and "VerticalAxis not set". It does not matter what I change on the model, I cannot get the chart to show anything else. When using Visual Studio to look at the ChartView, the DataContext binding is valid, the series are all there, and all of the series have correct bindings to the model properties and seem to be correct. I noticed that the axes get their Chart property set when assigned to the series, so I have tried rebuilding the axes in the same way I do when the chart is working (first view).

I have also tried binding the DataContext of the ChartView to a different DependencyProperty which allows me to get away from the exception (noted above), but still the same problem. I have tried stepping through the Visual Tree and rebuilding all of the bindings to ensure they are all active, but this has no effect.

What would cause the EmptyContent message to show when there are series available, each with axes set and are visible, and have point data?

Rik
Top achievements
Rank 1
 answered on 08 Aug 2017
5 answers
246 views

Hi,

We use the standard bing map provider in our WPF apps (2016.2.503.40).

We have just received notification that Microsoft are retiring Bing Maps AJAX Control and the SOAP Web Services on June 30, 2017. 

Will this affect our current apps, or does the map control use v8\rest services? 

Thanks,

Lee

 

 

 

Petar Mladenov
Telerik team
 answered on 08 Aug 2017
4 answers
666 views

I am trying to update a DataTable using a RadGridView. The data is displayed but whenever a column is edited and the cursor moved off the column the old data reappears. E.g. the underlying DataTable is not updated.

 

<Window x:Class="TestRadGridEdit.MainWindow"
        xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:gridView="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView"
        xmlns:Controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
        xmlns:data="clr-namespace:Telerik.Windows.Data;assembly=Telerik.Windows.Data"       
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Controls:RadGridView Name="radGridView_HeadOfHouse" AutoGenerateColumns="False" ItemsSource="{Binding GetData}" DataContext="{Binding ElementName=radGridView_HeadOfHouse, Path=DataContext}">
            <Controls:RadGridView.Columns>
                <Controls:GridViewDataColumn UniqueName="FirstName" Header="First Name" DataMemberBinding="{Binding FirstName, Mode=TwoWay}" />
                <Controls:GridViewDataColumn UniqueName="LastName" Header="Last Name" DataMemberBinding="{Binding LastName, Mode=TwoWay}" />
            </Controls:RadGridView.Columns>
        </Controls:RadGridView>
    </Grid>
</Window>
using System.Data;
using System.Windows;
using System.Windows.Data;
  
using Telerik.Windows.Controls;
  
namespace TestRadGridEdit
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
  
            Binding bind = new Binding();
            bind.Source = GetData();
            radGridView_HeadOfHouse.SetBinding(RadGridView.ItemsSourceProperty, bind);
        }
  
  
        public DataTable GetData()
        {
            DataTable dt = new DataTable("Testing");
            dt.Columns.Add(new DataColumn("FirstName"));
            dt.Columns.Add(new DataColumn("LastName"));
              
            DataRow dr = dt.NewRow();
            dr["FirstName"] = "Tom";
            dr["LastName"] = "Smith";
            dt.Rows.Add(dr);
              
            dr = dt.NewRow();
            dr["FirstName"] = "Fred";
            dr["LastName"] = "Smith";
            dt.Rows.Add(dr);
              
            dr = dt.NewRow();
            dr["FirstName"] = "Jack";
            dr["LastName"] = "Smith";
            dt.Rows.Add(dr);
              
            dr = dt.NewRow();
            dr["FirstName"] = "Joe";
            dr["LastName"] = "Smith";
            dt.Rows.Add(dr);
              
            dt.AcceptChanges();
            return dt;
        }
    }
}
What am I missing?

Valentin
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 08 Aug 2017
0 answers
176 views

I need to bind List<string>  to a treeview,  the string is cut by /,like "a/b/c/d" ,''a/b/e/f" ,"a/b/c/g" ,  

Is any simple method to bind it   without  constructing  a cascading object?

rui
Top achievements
Rank 1
 asked on 08 Aug 2017
1 answer
706 views

Hello Telerik,

 

I'm using a DataTable to set my RadGridView ItemsSource. My grid was set like this :

_Xaml

<telerik:RadGridView x:Name="gridSaisie" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" ShowGroupPanel="False" CanUserInsertRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" RowIndicatorVisibility="Collapsed" AutoGenerateColumns="False" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto" CellValidating="gridSaisie_CellValidating" CellEditEnded="gridSaisie_CellEditEnded" RowEditEnded="gridSaisie_RowEditEnded"/>

_C#

private void ConstructGrid()
        {
            //Création de la colonne de dates
            GridViewDataColumn colonneDate = new GridViewDataColumn();
            colonneDate.DataMemberBinding = new Binding("Date");
            colonneDate.Header = "Jour";
            colonneDate.UniqueName = "Jour";
            colonneDate.DataFormatString = "{0: dd}";
            colonneDate.IsReadOnly = true;
            colonneDate.Width = 150;
            colonneDate.IsSortable = false;
            colonneDate.IsFilterable = false;
            colonneDate.HeaderTextAlignment = TextAlignment.Center;
            //colonneDate.DataType = typeof(DateTime);
 
            this.gridSaisie.Columns.Add(colonneDate);
 
            //Création dynamique des colonnes
            foreach (Variable v in this.ViewModel.Variables)
            {
                GridViewDataColumn colonneVariable = new GridViewDataColumn();
                var bindVariable = new Binding(string.Format("Variable_{0}", v.Id));
                bindVariable.UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged;
                bindVariable.StringFormat = "{0:F1}";
                bindVariable.Mode = BindingMode.TwoWay;
                colonneVariable.DataMemberBinding = bindVariable;                
                colonneVariable.Header = v.Code;
                colonneVariable.UniqueName = string.Format("Variable_{0}", v.Id);
                colonneVariable.IsReadOnly = false;
                //colonneVariable.Width = ;
                colonneVariable.IsSortable = false;
                colonneVariable.IsFilterable = false;
                colonneVariable.HeaderTextAlignment = TextAlignment.Center;
                //colonneVariable.DataType = typeof(double);
 
                this.gridSaisie.Columns.Add(colonneVariable);
            }
        }
 
        private void LoadData(int idStation)
        {
            this.gridSaisie.ItemsSource = this.ViewModel.Jours; //Its the DataTable
        }

 

I have somes problems :

1) When I set DataType = typeof(...), the displayed values are empty.

2) StringFormat for the Date doesn't work.

3) When I start updating, the cell value is hidden (I think is linq to '4)')

3) I can't update values in the Grid. I found this topic : http://www.telerik.com/forums/updating-a-datatable-with-radgridview where is it explain that the update will be to do manually. So I didi it :

private void gridSaisie_CellEditEnded(object sender, GridViewCellEditEndedEventArgs e)
        {
            int numCol = e.Cell.Column.DisplayIndex;
            int numRow = this.gridSaisie.Items.IndexOf(this.gridSaisie.SelectedItem);
            var row = this.ViewModel.Jours.Rows[numRow];
 
            row.BeginEdit();
 
            var colonnes = row.ItemArray;
            colonnes[numCol] = e.NewData.ToString();// Convert.ToDouble(e.NewData.ToString());
 
            row.EndEdit();
            row.AcceptChanges();
            //this.gridSaisie.Rebind();
        }

But there isn't changement.

 

Can you help me ?

 

Thank you.

Dinko | Tech Support Engineer
Telerik team
 answered on 07 Aug 2017
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?