Telerik Forums
UI for WPF Forum
1 answer
116 views
I am using Telerik RadGridView for WPF. I have a scenario where a user types some value in the RadGridView cell and then clicks on the save button. I want to get the updated value that the user just typed in the cell. When I tab-out from the cell then I can get the updated value in CellEditEnded event. But in my scenario I don't want to tab-out from the RadGridView cell.
Martin Ivanov
Telerik team
 answered on 04 Mar 2020
7 answers
1.6K+ views

Hi,

I'm disappointed to not successfully bind a column on a custom object: is it possible to display a custom object in a cell of a grid ?

If i use DataMemberBinding jointly with CellTemplate, the dataContext of the gridviewcell is not my property but still the 'row object':

Is GridViewDataColumn's purpose to bind on 'simple properties' ?

Thanks a lot,

Example: The 2nd column doesn't display the button content neither bind the command because the datacontext of the cell is still a 'Row' object and not and 'Item' object.

 

Code:

public class MyViewModel : Telerik.Windows.Controls.ViewModelBase
    {
        public MyViewModel()
        {
            this.ItemsSource = new ObservableCollection<Row>()
            {
                new Row() { RowName = "Row 1" },
                new Row() { RowName = "Row 2" },
                new Row() { RowName = "Row 3" },
            };
        }
 
        public ObservableCollection<Row> ItemsSource { get; set; }
    }
 
    public class Row
    {
        public Row()
        {
            this.Item = new Item();
        }
 
        public Item Item { get; private set; }
        public string RowName { get; set; }
    }
 
    public class Item
    {
        private static Random rnd = new Random();
 
        public Item()
        {
            this.Display = string.Format("Item {0}", rnd.Next(1, 999));
            this.FireItem = new Telerik.Windows.Controls.DelegateCommand((object o) =>
            {
                System.Diagnostics.Debug.WriteLine("Double click on " + this.Display);
            });
        }
 
        public string Display { get; set; }
 
        public ICommand FireItem { get; set; }
    }

 

Xaml : 

<Window.Resources>
        <local:MyViewModel x:Key="MyViewModel" />
        <DataTemplate x:Key="ItemTemplate">
            <Button Width="75"
                    Height="75"
                    Command="{Binding FireItem}"
                    Content="{Binding Display}" />
        </DataTemplate>
    </Window.Resources>
    <Grid>
        <telerik:RadGridView AutoGenerateColumns="False"
                             DataContext="{Binding Source={StaticResource MyViewModel}}"
                             IsReadOnly="True"
                             ItemsSource="{Binding ItemsSource}">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding RowName}"
                                            Header="Stage" />
 
                <telerik:GridViewDataColumn CellTemplate="{StaticResource ItemTemplate}"
                                            DataMemberBinding="{Binding Item}"
                                            Header="Item" />
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
Yoan
Telerik team
 answered on 04 Mar 2020
3 answers
246 views

Please, I need show a RadWindow inside to RadNavigationView.

 

Could you help me!

Vicky
Telerik team
 answered on 04 Mar 2020
4 answers
837 views

Hello
What are the possible drawbacks of disabling the AutomationManager?

AutomationManager.AutomationMode = AutomationMode.Disabled;

It drastically improved shape manipulation. It was extremelly slow when resizing and creating shapes before changing the AutomationMode.

My question is, what is this for? What am I losing by disabling it? I've read the documentation but didn't understand it well.

Thank you!!

 

Alexander
Top achievements
Rank 1
 answered on 04 Mar 2020
1 answer
100 views

Hi,
We are trying to port the existing .net framework WPF application with Telerik packages to .net Core WPF application. And we are using the Telerik latest stable version for the .net framework. While checking for Portability analysis we found some of the assemblies are missing in .net Core.
  Telerik.Windows.Controls
  Telerik.Windows.Controls.Diagrams 
  Telerik.Windows.Controls.GridView 
  Telerik.Windows.Controls.Input 
  Telerik.Windows.Controls.Navigation
  Telerik.Windows.Controls.RibbonView 
  Telerik.Windows.Data
  Telerik.Windows.Diagrams.Core 
Kindly help us out in this issue.

 

Thank you

Vladimir Stoyanov
Telerik team
 answered on 04 Mar 2020
4 answers
834 views

Hi,

why is this working:

<telerik:RadRibbonWindow
    x:Class="N4W.App.GuiLayer.Modules.OperatingCostsModule.Views.ProceedTest"
    xmlns:local="clr-namespace:N4W.App.GuiLayer.Modules.OperatingCostsModule.Views"
    mc:Ignorable="d" Height="200" Width="400"
    d:DesignHeight="450" d:DesignWidth="800">
 
    <telerik:RadRibbonWindow.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <!--<ResourceDictionary>
                    <Style TargetType="local:ProceedTest" BasedOn="{StaticResource RadRibbonWindowStyle}" />
                </ResourceDictionary>-->                                          
 
                <ResourceDictionary Source="RibbonWindowStyle.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </telerik:RadRibbonWindow.Resources>
    <Grid>
        <TextBlock Text="Hallo" />
    </Grid>
</telerik:RadRibbonWindow>

where the content of RibbonWindowStyle.xaml is:

                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:N4W.App.GuiLayer.Modules.OperatingCostsModule.Views"
                    >
     
    <Style TargetType="local:ProceedTest" BasedOn="{StaticResource RadRibbonWindowStyle}" />
 
</ResourceDictionary>

pic RadWindow2.jpg

 

and this is not working:

<telerik:RadRibbonWindow
    x:Class="N4W.App.GuiLayer.Modules.OperatingCostsModule.Views.ProceedTest"
    xmlns:local="clr-namespace:N4W.App.GuiLayer.Modules.OperatingCostsModule.Views"
    mc:Ignorable="d" Height="200" Width="400"
    d:DesignHeight="450" d:DesignWidth="800">
 
    <telerik:RadRibbonWindow.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary>
                    <Style TargetType="local:ProceedTest" BasedOn="{StaticResource RadRibbonWindowStyle}" />
                </ResourceDictionary>                                          
 
                <!--<ResourceDictionary Source="RibbonWindowStyle.xaml" />-->
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </telerik:RadRibbonWindow.Resources>
    <Grid>
        <TextBlock Text="Hallo" />
    </Grid>
</telerik:RadRibbonWindow>

pic RadWindow1.jpg

 

For me both versions should end up in the same result, or what is the difference?!

 

BR Gert

 

 

 

 

 

Gert
Top achievements
Rank 1
 answered on 04 Mar 2020
8 answers
142 views

I am using the latest release. I have this code -- I even tried manually forcing the selection, but it didn't help any:

Workbook spreadsheetWorkbook = new XlsxFormatProvider( ).Import( result );
 
//I tried to force the active worksheet, but this doesn't help either!
spreadsheetWorkbook.ActiveWorksheet = spreadsheetWorkbook.Worksheets.FirstOrDefault( );
 
foreach ( var sheet in spreadsheetWorkbook.Worksheets )
{
    sheet.ViewState.IsSelected = false;
}
 
if ( spreadsheetWorkbook.ActiveWorksheet != null )
{
    spreadsheetWorkbook.ActiveWorksheet.ViewState.IsSelected = true;
}
 
spreadsheet.Workbook = spreadsheetWorkbook;

 

And the result is attached. 

 

Please advise...

Regards,

 

Dimitar
Telerik team
 answered on 04 Mar 2020
6 answers
1.0K+ views

Hi,

is it possible to change the full text search behavior from contains to start with?

The users whant e.g. to search vor zip codes and they do not want to see a lot of other results... pls see attached pic.

 

If it is possible is it also possible to switch the behavior at run time? Than I could provide a checkbox where the user can switch back to "contains-mode".

 

Thanks for help!!!

BR Gert

 

Vladimir Stoyanov
Telerik team
 answered on 04 Mar 2020
1 answer
290 views

Hello,

 

I have followed your WPF example: 

public class PlayerTypeConverter : TypeConverter
{
    public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
    {
        return true;
    }
 
    public override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
    {
        return true;
    }
 
    public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
    {
 
        return new StandardValuesCollection(new string[] { "Mark Wright", "Ian Rush", "John Barnes",
               "Paul Ince", "Jamie Redknapp", "Sami Hyypia", "Steven Gerrard ", "Jordan Henderson" });
    }
}

and attached the converter to my property:

/// <summary>
/// Sets the algorithm that is available for the mode.
/// </summary>
[Category("Reconstruction")]
// [Editor(typeof(AlgorithmEditor), typeof(UITypeEditor))]
[Telerik.Windows.Controls.Data.PropertyGrid.Editor(typeof(ComboBox))]
[TypeConverter(typeof(AlgorithmConverter))]
[Description("Sets the algorithm that is available for the mode.")]
public string Algorithm
{
    get => GetProperty<string>();
    set => SetProperty(value);
}

 

 

 

Unfortunately when setting the property to the PropertyGrid the combobox does not show up.

The type converter is not even used. Originally I had the PropertyInspector which is still active until I have transitioned to the RadPropertyGrid, here the TypeConverter is used without any problems.

What could be the problem?

 

Thanks

Martin

Yoan
Telerik team
 answered on 03 Mar 2020
3 answers
144 views
Hi,

I would like to know if it's possible by code when using the FindAll methods to highlight all search results and navigate through them in the document?

Thank's
Alain
Tanya
Telerik team
 answered on 02 Mar 2020
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
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
Licensing
WebCam
CardView
DataBar
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?