Telerik Forums
UI for WPF Forum
2 answers
82 views

When using HeaderTextWrapping and FilteringMode.FilterRow the headers does not look consistent. The filter-rows should take up the same height on all columns. This looks the same for several styles.

Solution: The GridViewHeaderRowTemplate contains a Grid named PART_OuterGrid, and it's second RowDefinition should have Auto-height.

Magnus
Top achievements
Rank 1
 answered on 31 Aug 2017
2 answers
77 views

For what it worth, playing around with the reminders example I found that it wouldn't open the appointment for edition when the "Open Item"  button is clicked.

I checked the git repository to see if this is already addressed, but the last update to this files is about 4 years old, so here is the trick:

 

It turns out that at the time where the scheduleview reference is passed to the ReminderViewModel constructor (via the ViewModel class constructor), it is null.

So I added a ScheduleView property to ViewModel as a fachade for the reminder's view model property:

        public RadScheduleView ScheduleView
        {
            get { return reminderViewModel.ScheduleView; }
            set { reminderViewModel.ScheduleView = value; }
        }

and set it again once the IntializeComponent() method is called in the Example window's constructor:

        public Example()
        {
            viewModel = new ViewModel(this.scheduleView);
            this.DataContext = viewModel;
            InitializeComponent();
            viewModel.ScheduleView = this.scheduleView;
        }

And presto! Now it works as expected.

 

Best regards.

Richard
Top achievements
Rank 1
Iron
 answered on 30 Aug 2017
2 answers
231 views

RadRichTextBox control is really a wonderful control, but their are problems when writing in Arabic (right to left). I could override those problems unless for a major problem; where if the user wanted to enclose an Arabic word within brackets, then the direction and position of brackets change, as shown in the attached image.

How to correct this abnormal behavior???!

Any help please !!!

thank you ...

 

①Dr Mostafa
Top achievements
Rank 1
 answered on 30 Aug 2017
1 answer
99 views

I have a case where the event handler that handles AppointmentSaving is invoked twice, but only every other time. It goes like this:

 

1) Find a calendar event

2) Drag the edge of the event to make it wider

3) Find a second event, and drag *that* event wider. AppointmentSaving will be called twice.

4) Repeat every other time. (2, 4, 6, 8, etc. with no end)

 

Here's the XAML setting up the event handler:

 

<i:EventTrigger
    EventName="AppointmentSaving">
    <vp:EventToCommandAction
        PassEventArgsToCommand="True"
        Command="{Binding HandleDowntimeSavingCommand, Mode=OneWay}" />
</i:EventTrigger>

 

Here's the event handler itself:

 

public ICommand HandleDowntimeSavingCommand => DelegateCommand.Create<AppointmentSavingEventArgs>(HandleDowntimeSaving);
internal void HandleDowntimeSaving(AppointmentSavingEventArgs eventArgs)
{
    var downtime = (DowntimeViewModel)eventArgs.Appointment;
    var numExceptionsRemoved = RemovePointlessExceptions(downtime);
    var numExceptionsConverted = ConvertExceptionsToIsolatedDowntimes(downtime);
    if (numExceptionsRemoved > 0 && numExceptionsConverted == 0)
    {
        eventArgs.Cancel = true;
    }
}

 

DelegateCommand.Create is used in literally thousands of places; it's not the source of the bug. If I set a breakpoint on the first line of the event handler, it will be hit twice, but only on every second edit.

Dilyan Traykov
Telerik team
 answered on 30 Aug 2017
5 answers
134 views

Hi! I'm using the implementation from the RowReorder-demo to get drag-n-drop in my RadGridView. It works really good, but I have an issue with copying. When reaching OnDrop the e.Effects are ALWAYS DragDropEffects.All (even when just moving an item).

In OnGiveFeedback the e.Effects is DragDropEffects.Copy (if pressing Ctrl), but it's not in OnDrop. I also checked the OnPreviewDrop method, but it's DragDropEffects.All there also.

Do I have to add something somewhere? In OnDragInitialize the e.AllowedEffects are set to DragDropEffects.All.

Magnus
Top achievements
Rank 1
 answered on 30 Aug 2017
1 answer
123 views

Hi

<telerik:RadScheduleView x:Name="scheduleView"  
                                 GroupDescriptionsSource="{Binding GroupDescriptions}" 
                                 ResourceTypesSource="{Binding Resources}" VisibleRangeChanged="scheduleView_VisibleRangeChanged"
                                 VisibleRangeChangedCommand="{Binding VisibleRangeChanged}" 
                                 VisibleRangeChangedCommandParameter="{Binding VisibleRange, RelativeSource={RelativeSource Self}}"
                                 GroupHeaderContentTemplateSelector="{StaticResource CustomGroupHeaderContentTemplateSelector}">
            <telerik:RadScheduleView.ViewDefinitions>
                <telerik:DayViewDefinition />
                <telerik:WeekViewDefinition />
            </telerik:RadScheduleView.ViewDefinitions>
        </telerik:RadScheduleView>

private void scheduleView_VisibleRangeChanged(object sender, EventArgs e)
        { 
            this.scheduleView.AppointmentsSource = new ObservableCollection<Appointment>();
        }

Kalin
Telerik team
 answered on 30 Aug 2017
3 answers
326 views

I am trying to figure out if it is possible to set the AutoFitColumnWidth or control the width of a column for the PDF output of a WPF Grid?

 

I have the following code for setting up my export options.

public void ExportToPdf(RadGridView grid)
{
    grid.ElementExportingToDocument -= Grid_ElementExportingToDocument;
    grid.ElementExportingToDocument += Grid_ElementExportingToDocument;
     
    var exportOptions = new GridViewDocumentExportOptions
    {
        AutoFitColumnsWidth = false,
        ExcludedColumns = { grid.Columns[9], grid.Columns[10], grid.Columns[11], grid.Columns[12] },
        ShowColumnHeaders = grid.ShowColumnHeaders
    };
 
    var dialog = new SaveFileDialog
    {
        DefaultExt = "pdf",
        FileName = SelectedCollege.CollegeCD + " - Roster.pdf",
        Filter = "Pdf Files|*.pdf"
    };
 
    if (dialog.ShowDialog() == true)
    {
        using (var stream = dialog.OpenFile())
        {
            grid.ExportToPdf(stream, exportOptions);
        }
    }           
}

 

I do not want ALL columns to auto size, because I have columns with single digit values in them and they look terrible squished together. I REALLY would like to set the width manually so the output looks good. 

My Grid columns are all Width="*" on the XAML side. And as you can see I am subscribing to the "ElementExportingToDocument" event and styling the grid to look the way it needs to look as far as foreground and background sizes. 

Are we limited only to the CellSelectionStyle properties when it comes to customizing the export? 

Martin Ivanov
Telerik team
 answered on 29 Aug 2017
1 answer
397 views

I'm just trying to do something that seemingly should be simple... trying to map individual checkboxes in a telerik:GridViewSelectColumn in a telerik:RadGridView to a corresponding Boolean property of an entity mapped for each individual row.

<telerik:RadGridView x:Name="MyGridView" ItemsSource="{Binding MyGridViewItems, Mode=TwoWay}" SelectionMode="Extended" AutoGenerateColumns="False">    
    <telerik:RadGridView.Columns>
<telerik:GridViewSelectColumn Name="MyCheckBoxColumn">
   <telerik:GridViewSelectColumn.CellTemplate>
<DataTemplate>
   <CheckBox Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:GridViewDataControl}}, Path=DataContext.IncludeChangedCommand}" CommandParameter="{Binding}" IsChecked="{Binding MyBooleanProperty, Mode=TwoWay}" />
</DataTemplate>
   </telerik:GridViewSelectColumn.CellTemplate>                                            
</telerik:GridViewSelectColumn>

.
.
.

    </telerik:RadGridView.Columns>
</telerik:RadGridView>

 

How do I map MyBooleanProperty in each row/entity to each individual checkbox represented in the Grid?

Dinko | Tech Support Engineer
Telerik team
 answered on 29 Aug 2017
1 answer
217 views

Hi, 

As part of application development, we are using the Telerik:RadTreeView to support UI viertualization in the tree view.

We have a requirement to make a data subscription to each tree view item after finish loading all of the items... basically would like to when virtualizaiton loaded the visible items and unloaded the invisible items...

 

Is there are any event or sample code to refer for above functionality?

I am new to this... and gone through RadTreeView documentation, but didnt find any suitable events for this..

Thanks

Rama. 

Martin Ivanov
Telerik team
 answered on 29 Aug 2017
0 answers
132 views

Dear Telerik Admin Team

I have some issues during using RadRibbonView,Kindly help me to solve them. Any feedback I do appreciate.

1. How to use Build-in theme for RadRibbonView? For example I found a theme Office2016 that really very beautiful and I would like to use it as default theme.

2.Please see attachment 'RibbonTab Cannot display normally", In this case I have add some RibbonTab into RibbonView, but only selected RabbionTab can display and other cannot see correctly, I tried to move mouse and hover on unselected RibbonTabs, I can see these RabbionTabs, this is very strange.

3. When I collapsed RabbionView, what I expected should be that only tabs header display correctly, but after collapse I cannot see anything, really very strange.Please see attachment 'Collaspe issue'.

Ning
Top achievements
Rank 1
 asked on 29 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
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
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?