Telerik Forums
UI for WPF Forum
1 answer
315 views

Hello,

 

I'm creating a telerik RadWizard App with dynamic wizardpages (c#).

 

Currently only the next and previous buttons seem to be doing something, whenever i click on cancel / finish, my application doesn't do anything.

 

How can i control this behavior?

 

Regards

Ricardo
Top achievements
Rank 1
 answered on 16 May 2018
2 answers
159 views

Hi,

I'm having an issue with the diagram, all my shapes have the rotation adorner enabled so i can rotate them with the mouse, however you need to to go to the center of the icon to be able to grab it and start the rotation.

 

I tried to change the FontSize of the textblock, i tried to put a border around the textblock and also i tried to change the telerik textblock to an image but they all seem to fail.

No matter how big the "RotationAdorner" is you always need to click the center in order to rotate shapes, which in tablet mode makes it really hard to use, is there any way i can change this?

 

Thanks

ODB
Top achievements
Rank 1
 answered on 16 May 2018
3 answers
91 views

Is it possible to add items to a TreeListView dynamically. Any sample code?

Dinko | Tech Support Engineer
Telerik team
 answered on 15 May 2018
4 answers
703 views

I have the blow routine

private void btn_ExportExcel(object sender, RoutedEventArgs e)
        {
            if (dgResults.DataContext == null) return;

            var extension = "xls";
            var dialog = new Microsoft.Win32.SaveFileDialog()
            {
                DefaultExt = extension,
                Filter = String.Format("{1} files (*.{0})|*.{0}|All files (*.*)|*.*", extension, "Excel"),
                FilterIndex = 1
            };
            if (dialog.ShowDialog() == true)
            {
               dgResults.ElementExporting -= ElementExporting;
                dgResults.ElementExporting += ElementExporting;

                 using (var stream = dialog.OpenFile())
                {

                    // dgResults.ExportSettings.ExportOnlyData = true;
                    // dgResults.ExportSettings.UseItemStyles = true;
                    dgResults.Export(stream,
                     new GridViewExportOptions()
                     {

                         Format = ExportFormat.Html,
                         ShowColumnHeaders = true,
                         ShowColumnFooters = false,
                         ShowGroupFooters = false,

                     });
                }
                                MessageBox.Show("Exporting to Excel has completed successfully");
            }
        }

The routine is executing succesfully, after saving the resultant Excel, when I try to open it, its showing an error messsage as below...

"The file format and extension of 'File1.xls' don't match. The file could be currupted or unsafe. Unless you trust its source, don't open it. Do you want to open it anyway?"

I tried with different formats like csv, html, ExcelML, the same error pops out. When I click 'Yes', its opening with the perfect data.

I would like to request, any help to fix this issue.

Thanks in advance. 

 

 

 

 

 

maruti vinod
Top achievements
Rank 1
 answered on 15 May 2018
2 answers
136 views

Hello,

 

I'm developing a new App using telerik wizard.

 

I'm currently exploring the possibility to add dynamic wizard pages, but i need to change the ButtonsVisibilityMode in the source code, i.e.,

 

<p>using xaml it would be like:</p><p></p><p>ButtonsVisibilityMode="Cancel,Next"</p>

 

Does anyone know how i can do this in c#?

 

I have tried:

<p> WizardPage wizardPage = new WizardPage()<br> {</p><p>     ButtonsVisibilityMode = "Next, Cancel"</p><p>};</p>

 

But I'm getting the following error: cannot convert 'string' to WizardPageButtonsDisplayMode.

Can anyone help me?

 

Regards

 

 

Dinko | Tech Support Engineer
Telerik team
 answered on 15 May 2018
1 answer
115 views
Is there any possibility for FileDialogs support network paths?
Martin Ivanov
Telerik team
 answered on 15 May 2018
2 answers
141 views

Hi,

I'm using following method to translate the header of my datagrid columns:

        protected override object ProvideDynamicValue(IServiceProvider serviceProvider)
        {
            //if (UsersModel.LoggedInUser == null)
            //    throw new Exception("User not identified !");

            if (DesignerProperties.GetIsInDesignMode(new System.Windows.DependencyObject()))
                return ResourceName;

            var rootObjectProvider = serviceProvider.GetService(typeof(IRootObjectProvider)) as IRootObjectProvider;
            var fqName = Global == "False" ? rootObjectProvider?.RootObject.GetType().FullName : "Global";

            return TranslationBL.GetTranslation(!string.IsNullOrWhiteSpace(fqName) ? fqName + "_" + ResourceName : ResourceName);
        }

In XAML:

<telerik:GridViewDataColumn Header="{bx:LocalizeBinding Customer, Global=True}" DataMemberBinding="{Binding CustomerShortName}"/>

Uptill now this was working great.  Now I have a DataGrid defined in a RowDetailsTemplate:

                <telerik:RadGridView.RowDetailsTemplate>
                    <DataTemplate>
                        <TabControl>
                            <TabItem Header="Fini" Background="LightGray">
                                <telerik:RadGridView ItemsSource="{Binding StockFiniDetails}" ShowSearchPanel="False" SelectionMode="Single" AlternationCount="0"                                                                       MaxHeight="350">
                                    <telerik:RadGridView.Resources>
                                        <Style TargetType="telerik:GridViewHeaderCell">
                                            <Setter Property="Background" Value="LightGray"/>
                                        </Style>
                                    </telerik:RadGridView.Resources>
                                    <telerik:RadGridView.Columns>
                                        <telerik:GridViewDataColumn Header="{bx:LocalizeBinding Variant, Global=True}" DataMemberBinding="{Binding Variant}"/>
                                        <telerik:GridViewDataColumn Header="{bx:LocalizeBinding StockSpec, Global=True}" DataMemberBinding="{Binding StockSpec}"/>
                                        <telerik:GridViewDataColumn Header="{bx:LocalizeBinding Passe, Global=True }" DataMemberBinding="{Binding Passe}"/>
                                        <telerik:GridViewDataColumn Header="{bx:LocalizeBinding PartNumber, Global=True }" DataMemberBinding="{Binding                                                                                                                  PartNumber}"/>
                                        <telerik:GridViewDataColumn Header="Rayon" DataMemberBinding="{Binding Rayon}"/>
                                        <telerik:GridViewDataColumn Header="{bx:LocalizeBinding GrossLength, Global=True }" DataMemberBinding="{Binding                                                                                                                 GrossLength}" DataFormatString="{} {0:N2}" CellStyle="{StaticResource                                                                                                                                             TelerikGridViewCellRightAlignedStyle}"/>
                                        <telerik:GridViewDataColumn Header="{bx:LocalizeBinding NetLength, Global=True }" DataMemberBinding="{Binding NetLength}"                                                                                                 DataFormatString="{} {0:N2}" CellStyle="{StaticResource TelerikGridViewCellRightAlignedStyle}"/>
                                        <telerik:GridViewDataColumn Header="{bx:LocalizeBinding CostPrice, Global=True }" DataMemberBinding="{Binding CostPrice}"                                                                                                   DataFormatString="{} {0:N2}" CellStyle="{StaticResource TelerikGridViewCellRightAlignedStyle}"/>
                                        <telerik:GridViewDataColumn Header="{bx:LocalizeBinding Date, Global=True}" DataMemberBinding="{Binding StockDate}" Style="                                                                                              {StaticResource TelerikGridViewDataColumnShortDateStyle}"/>
                                        <telerik:GridViewDataColumn Header="{bx:LocalizeBinding Comment, Global=True}" DataMemberBinding="{Binding Comment}"/>
                                        <telerik:GridViewDataColumn Header="{bx:LocalizeBinding Invoice, Global=True}" DataMemberBinding="{Binding InvoiceNumber}"/>
                                        <telerik:GridViewDataColumn Header="{bx:LocalizeBinding VIS_ASPECT}" DataMemberBinding="{Binding VisAspect}"/>
                                        <telerik:GridViewDataColumn Header="{bx:LocalizeBinding TEC_ASPECT}" DataMemberBinding="{Binding TecApsect}"/>
                                    </telerik:RadGridView.Columns>
                                </telerik:RadGridView>
                            </TabItem>
                        </TabControl>
                    </DataTemplate>
                </telerik:RadGridView.RowDetailsTemplate>

In this case

    var rootObjectProvider = serviceProvider.GetService(typeof(IRootObjectProvider)) as IRootObjectProvider;

returns null resulting in an invalid translation.

I found out that the ServiceProvider is of type MS.Internal.ServiceProviderContext when the ProvideDynamicValue(IServiceProvider serviceProvider) is called from a 'normal' DataColumn.  When called from a DataColumn defined in a RowDetailsTemplate, the ServiceProvider is of type System.Windows.Markup.ProviceValueServiceProvider.

How can I solve this ?

Best Regards,
Hans

 

Hans
Top achievements
Rank 1
Veteran
 answered on 14 May 2018
27 answers
1.6K+ views
Hi everyone,

out of nowhere my telerik controls stopped to display in VS Designer.

Could you help me what should I do to bring them back?

Thank you for your replies.
Lance | Senior Manager Technical Support
Telerik team
 answered on 14 May 2018
1 answer
431 views

Hi.

I use GridViewDataColumn.CellTemplate. I have a bool SatisfiesSearch property  and I want use DataTrigger to collapsed rows.

<telerik:RadGridView.RowStyle >

                <Style TargetType="telerik:GridViewRow">
                    
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding Path=SatisfiesSearch, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Value="False">
                            <Setter Property="Visibility" Value="Collapsed"/>
                            <Setter Property="MinHeight" Value="0"/>
                            <Setter Property="Height" Value="0"/>
                            <Setter Property="MaxHeight"  Value="0"/>
                        </DataTrigger>
                    </Style.Triggers>
              </Style>
</telerik:RadGridView.RowStyle>

It really works, but rows don't disappear, they hide.

 

Can you help me?

Stefan
Telerik team
 answered on 14 May 2018
1 answer
199 views

Hi

In my application the user should be able to switch between layouts at runtime. The hosted content (Radpanes content) can be different.

How do I achieve this.

 

I loading the initial layout works as expected. Dynamically adding Panes works too.

But if I call the LoadLayout Method again, nothing happens.

 

 public void LoadLayout(string layoutData)
        {
          
            using (var ms = new MemoryStream())
            {
                using (var sw = new StreamWriter(ms))
                {
                    sw.Write(layoutData);
                    sw.Flush();
                    ms.Position = 0;
                    _dockingManager.LoadLayout(ms);
                }
            }
        }

 

Before calling LoadLayout I tryed following :

(_dockingManager is RadDocking)

1) _dockingManager.Items.Clear();

2)

public bool DeletePanels(List<Guid> moduleIDs)
        {
            if (_dockingManager != null)
            {
                try
                {
                    foreach (Guid modID in moduleIDs)
                    {
                        var pane = _dockingManager.Panes.FirstOrDefault(p => RadDocking.GetSerializationTag(p).ToString().Equals(modID.ToString()));

                        if (pane != null)
                        {
                            ((TelerikDockingPanesFactory)_dockingManager.DockingPanesFactory).RemovePaneAdapter(_dockingManager, pane);
                        }

                    }

                    _dockingManager.UpdateLayout();
                    return true;
                }
                catch (Exception ex)
                {
                    Debug.WriteLine(ex.Message);
                    
                }
            }
            return false;
        }

Any ideas?

 

herbert
Top achievements
Rank 1
 answered on 14 May 2018
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
Slider
Expander
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
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
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?