Telerik Forums
UI for WPF Forum
2 answers
755 views

When the user drags an item to the top or bottom of the TreeListView, I'd like to scroll automatically, to handle the case where the user wants to drag to an item that isn't currently in view. I have a small sample program I can provide you, and OnDragOver is shown below. Can you tell me how to detect that the drag has reached the top or bottom of the view and then scroll as needed?

Thanks,

Georg Hentsch

        private void OnDragOver(object sender, Telerik.Windows.DragDrop.DragEventArgs e) {
            var dropTarget = e.OriginalSource as TreeListViewRow ?? (e.OriginalSource as FrameworkElement).ParentOfType<TreeListViewRow>();
            var details = DragDropPayloadManager.GetDataFromObject(e.Data, "DropDetails") as DropIndicationDetails;

            if (dropTarget == null || details == null) {
                return;
            }

            details.CurrentDraggedOverItem = dropTarget.DataContext;

            if (details.CurrentDraggedItem == details.CurrentDraggedOverItem) {
                e.Effects = DragDropEffects.None;
                e.Handled = true;
                return;
            }

            details.CurrentDropPosition = GetDropPositionFromPoint(e.GetPosition(dropTarget), dropTarget);

            if (IsChildOf(dropTarget, sourceItem)) {
                e.Effects = DragDropEffects.None; // don't allow item to be dropped to one of its own children
            }

            e.Handled = true;
        }

 

Georg
Top achievements
Rank 1
Veteran
 answered on 12 Sep 2020
3 answers
631 views

Dear Telerik Team,

I am using telerik Rad Grid View control and having issue with below code.

I am trying to set the background color of a row on mouse over.

Issue is On mouse over below Setter property 'Background' does not set the background color of the row instead it sets the border color. Pl advise on the correct Implementation.

<telerik:RadGridView x:Name="radGridView" Margin="8,100,0,0"
                            ItemsSource="{Binding Source={StaticResource AuthorsData}}"
                           IsFilteringAllowed="True"
                           AutoGenerateColumns="True" Grid.Column="1" >
            <telerik:RadGridView.RowStyle>
                <Style TargetType="telerik:GridViewRow">
                    <Setter Property="MinHeight" Value="20"/>
                    <Style.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" Value="Green"/>
                            <Setter Property="Foreground" Value="Black"/>
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </telerik:RadGridView.RowStyle>
        </telerik:RadGridView>

Thanks,
Vaibhav.

Dilyan Traykov
Telerik team
 answered on 11 Sep 2020
1 answer
172 views

Hi 

We have a radoutlookbar with some items in it When te user click on the minimize/restore-button ((1) in attached image)  it works perfect, the bar and all it content moves out and in. (see attached image). 

When user clicks on the "header" of the outlookbar ((2) in attached image) strange things happen. First click is most often than only the first  user control in the first item slides out, after that, sometimes the entire outlookbar is stuck half minimized and we have to restart the application. 

 

First of all, Im I doing something wrong in my xaml (below)? 

If not, is there any setting where I can make the rest of the outlookbar to minimiza/restore or could I catch the event and programmatically restore it? (We are using te MVVM approach) 

--xaml---------------------------------------

<telerik:RadOutlookBar DockPanel.Dock="Right" Width="600" IsVerticalResizerVisible="True" MinimizedButtonContent="Details" IsMinimized="True"  >
     <telerik:EventToCommandBehavior.EventBindings>
           <telerik:EventBinding EventName="SelectionChanged" Command="{Binding DrawerItemChangedCommand}" PassEventArgsToCommand="True"/>
           <telerik:EventBinding EventName="Restored" Command="{Binding ExpandCollapseDrawerCommand}" PassEventArgsToCommand="True"/>
           <telerik:EventBinding EventName="Minimized" Command="{Binding ExpandCollapseDrawerCommand}" PassEventArgsToCommand="True"/>
      </telerik:EventToCommandBehavior.EventBindings>
      <modelview:OneView DataContext="{Binding OneViewModel}"/>
      <telerik:RadOutlookBarItem Header="Another">
             <modelview:AnotherView DataContext="{Binding AnotherViewModel}" />
       </telerik:RadOutlookBarItem>
       <telerik:RadOutlookBarItem Header="LastViewIPromise">
                <moCompliance:LastView DataContext="{Binding LastViewModel}" />
        </telerik:RadOutlookBarItem>
</telerik:RadOutlookBar>

-------------------------------------------------

 

Thanks in advance, Robert

Dilyan Traykov
Telerik team
 answered on 10 Sep 2020
7 answers
293 views
Is there any way to have RadTileViewItems span more than one column or more than one row when in the restored state? If not would you consider this a feature request?

regards

// charlie
Martin Ivanov
Telerik team
 answered on 10 Sep 2020
4 answers
359 views
We have an issue where on a DateTimePicker, if you change the date, such as 8/29/2020 12:00 AM to 8/31/2020 12:00 AM, by editing the text in the field, on saving, it will not save the new date. It only seems to work if you click TAB after editing the text, or using the date picker button to change the date. Some users would like the ability to just change the test and click save, vs tabbing or using the date picker. 
Scott
Top achievements
Rank 1
Veteran
 answered on 09 Sep 2020
1 answer
437 views

Hi,

I have a FilePathPicker with DialogType="OpenFile".  Is there a way to set a default directory so that wen a user wants to pick a file, the FilePathPicker opens the the dialog with the files in this directory ?

Regards,
Hans

 
Martin Ivanov
Telerik team
 answered on 09 Sep 2020
1 answer
114 views

Bonjour
Lorsque j'ouvre un PDF à l'aide du bouton "Ouvrir" de la radtoolbar DE PdfViewer, j'aimerais obtenir le chemin du PDF sélectionné. Quelle est la meilleure façon à procéder? 

Merci

Dimitar
Telerik team
 answered on 09 Sep 2020
1 answer
529 views

We are currently setting up some tests with Microsofts UI Automation.

For my next steps I'm searching for a way to implement selection for GridView rows.
So far I couldn't really find any documentations how to deal with this with Telerik controls in detail.

Currently I access the grid, grid row and grid row cells as follows:

AutomationElement radGridView = Element.TryFindId (OrderConstants.ORDER_GRID_ID);
AutomationElementCollection orderRowElements = radGridView.FindAll (
                TreeScope.Descendants,
                new PropertyCondition (AutomationElement.ClassNameProperty, "GridViewRow"));
 
int rowId = 0;
foreach (AutomationElement orderRowElement in orderRowElements)
{
    ((SelectionItemPattern) orderRowElement.GetCurrentPattern(SelectionItemPattern.Pattern)).Select() // Is Not Supported Pattern
 
    AutomationElement elem = orderRowElement.TryFindId ($"Cell_{rowId++}_0");
    ((SelectionItemPattern) elem.GetCurrentPattern(SelectionItemPattern.Pattern)).Select() // Is Not Supported Pattern
}

 

How can I select

  • a single row
  • multiple rows
  • search within the grid (because it looks like rows are not available before they are processed by virtualization of the grid)

How is the RadGridView intended to be used in a automated way?

Currently I'm using .Net Framework 4 with Telerik Version 2018.3

 

Any help is appreciated, thanks.

Martin Ivanov
Telerik team
 answered on 08 Sep 2020
3 answers
129 views

Hello! 

I'm trying to figure out how to get the contents of my grid to sort by a property member that is not exposed to the UI via a column. The item source for my grid comes from a collection view defined on my ViewModel. This collection view has sort descriptors defined in C#, one of which is to sort by a boolean property that is not bound to a column on the grid, but that sort descriptor is not honored at run-time. 

 

Any assistance is appreciated.

Dilyan Traykov
Telerik team
 answered on 08 Sep 2020
2 answers
174 views

We have this sort of filter

        private CompositeFilterDescriptor _deletedNewFilterDescriptor = new CompositeFilterDescriptor()
        {
            LogicalOperator = FilterCompositionLogicalOperator.Or,
            FilterDescriptors =
                    {
                        new FilterDescriptor("Column1", FilterOperator.IsNotEqualTo, "MyState"),
                        new FilterDescriptor("Column2", FilterOperator.IsNotEqualTo, "YourState")
                    }
        };

and at some point when we refresh the grid, the rows that should be filtered get displayed. So we have to do something like this which also fails on occasions

 

        void grd_loaded(object sender, RoutedEventArgs e)
        {
            // For some reason, adding filters in constructors gets cleared somewhere, so add in Loaded methods.
            if (!grd.FilterDescriptors.Contains(_deletedNewFilterDescriptor))
                grd.FilterDescriptors.Add(_deletedNewFilterDescriptor);
        }

 

Any help would be appreciated. Because we will have to filter those rows at the SQL fetching time and not afterwards. This means changing the existing code.

Dilyan Traykov
Telerik team
 answered on 08 Sep 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
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
InlineAIAssistant
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?