Telerik Forums
UI for WPF Forum
0 answers
164 views

Hi, I am using the following code for the search as you type control inside a grid view:

<ControlTemplate x:Key="GridViewSearchPanelTemplate" TargetType="grid:GridViewSearchPanel">
        <Border BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}">
            <Grid UseLayoutRounding="True">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock
                            telerik:LocalizationManager.ResourceKey="GridViewSearchPanelTopText"
                            TextWrapping="Wrap"
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            IsHitTestVisible="False"/>
                    <Grid Grid.Column="1" Margin="10 0 10 0" VerticalAlignment="Center">
                        <TextBox x:Name="PART_SearchAsYouTypeTextBox"
                                AutomationProperties.Name="search as you type textBox"
                                Text="{Binding SearchText, Mode=TwoWay}"
                                MinWidth="160"
                                MaxWidth="200"
                                MinHeight="20"
                                Padding="3 3 15 3"
                                telerik:StyleManager.Theme="{StaticResource Theme}"
                                telerik:TextBoxBehavior.UpdateTextOnEnter="True"
                                FontSize="{Binding FontSize, RelativeSource={RelativeSource TemplatedParent}}"
                                IsTabStop="{TemplateBinding IsTabStop}"/>
                        <telerik:RadButton x:Name="ClearButton"
                                IsTabStop="False"
                                Visibility="Collapsed"
                                Style="{StaticResource ClearSearchValueButtonStyle}"
                                Command="searchPanel:GridViewSearchPanelCommands.ClearSearchValue"/>
                        <Grid.Triggers>
                            <EventTrigger RoutedEvent="MouseEnter">
                                <BeginStoryboard>
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ClearButton" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </BeginStoryboard>
                            </EventTrigger>
                            <EventTrigger RoutedEvent="MouseLeave">
                                <BeginStoryboard>
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ClearButton" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </BeginStoryboard>
                            </EventTrigger>
                        </Grid.Triggers>
                    </Grid>
                </Grid>
                <telerik:RadPathButton x:Name="CloseButton"
                        PathGeometry="M1,0 L4,3 L7,0 L8,1 L5,4 L8,7 L7,8 L4,5 L1,8 L0,7 L3,4 L0,1 z"
                        Visibility="{TemplateBinding CloseButtonVisibility}"
                        Grid.Column="1"
                        Width="22"
                        Height="22"
                        Padding="7"
                        Margin="0 5 5 5"
                        IsBackgroundVisible="False"
                        IsTabStop="False"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"
                        Command="controls:RadGridViewCommands.CloseSearchPanel"/>
            </Grid>
        </Border>
    </ControlTemplate>

The ClearButton is never enabled and because of this the command, nor the mouse hovering doesn't work. If I remove the command the button is enabled, so it would seem that the CanExecute of the command never returns true. Why is that?

I am using telerik version 2022.1.222

Remus
Top achievements
Rank 1
Veteran
 asked on 02 Jun 2022
1 answer
225 views

Hi,

Looking for the "Justify" Horizontal content alignment option in the RadDiagramTextShape. 

We have text shapes that have multi-line texts and we would like to justify align the text in the shape, how do we achieve the Justify text alignment for text?

 

Stenly
Telerik team
 answered on 01 Jun 2022
0 answers
174 views
If I set the ActiveTool on RadDiagram to be something like MouseTools.Pan, the icon that is displayed is controlled by setting DiagramCursors.Panning, however, there is no equivalent for the TextTool. How can I change set the mouse cursor when the Active Tool is the TextTool?
Matthew
Top achievements
Rank 1
 asked on 01 Jun 2022
2 answers
212 views

Hello,

I want to know if its possible to update Gantt Tasks when you change a Start Date or End Date from the Grid View part. For example, if I delay Proptotype Task, all the task behind should be delayed the same time as Prototype.

Leire
Top achievements
Rank 1
Iron
Iron
 answered on 01 Jun 2022
1 answer
173 views

Hi everyone,

I want to set the  color of the selected RadTabItem . I setted MaterialAssist.FocusBrush ,but it was not obvious. Can I set  the selected color like radiobutton in RadTabItem ,cover all the area?

 

 

Thank you!

Vicky
Telerik team
 answered on 31 May 2022
1 answer
178 views

hi Team,

I need to add a radpath button to the RadGridView's searchpanel .

RadGridView  doesnt has a particular style  property  for searchpanel, like it has for groups (i.e. GroupPaneItemStyle).

So I extracted the style, and to the control template added the radpath button.

But then this style is used globally in my application.  So this  button comes at  all  the places where the  RadGridView is used.

Now  I want to  add a attachproperty to the   radGridViewSearchPanel ,  which  can  be accessed from my different views and I should be able to control the  visibility  of my radpathbutton.

So I want something like this -

   

 <telerik:RadGridView
    Name="DeviceConnectionsGridView"
    ShowSearchPanel="True" 
    SearchPanelCloseButtonVisibility="Hidden"
My_AttachedProperty_For_SearchPanelsRadPathButtonVisbility =  "Visible"
/>

Here's what I performed -

I added an attached,  to  the GridViewSearchPanel class, but this property is only accessible where the GridViewSearchPanel is used.

In my case  ggridViewsearchpanel is  not  used directly but  coming from the  RadGridView, so this attach  property  is  not coming for R
adGridView.

So  plz  tell  me, how  can we  achieve  this ?


Stenly
Telerik team
 answered on 31 May 2022
1 answer
155 views

How can I add my own button as I marked in the picture?

            <telerik:RadScheduleView.ViewDefinitions>
                <telerik:DayViewDefinition DayStartTime="8:00" DayEndTime="20:00"/>
                <telerik:WeekViewDefinition DayStartTime="8:00" DayEndTime="20:00" x:Name="WeekViewDefinition"/>
                <telerik:MonthViewDefinition />
            </telerik:RadScheduleView.ViewDefinitions>
Stenly
Telerik team
 answered on 30 May 2022
0 answers
271 views

In Gridview collection, once collection is loaded from data source, we evaluate some conditions, that depends on previous records. Such that if previous record and current record has same Owner Id, then hide signature of current record i.e. IsVisible=false; else make it visible. 

e.g.

index 0:     {OwnerId = 123, IsVisible=True}        // Index 0 is always true

index 1:      {OnwerId = 123, IsVisible = false}    // Index 1 Owner Id == Index 0 Owner Id

index 2:     {OwnerId = 456, IsVisible = true}   // index 2 Owner id != index 1 Owner Id

Index 3:     {OwnerId = 567,  IsVisible = true}

Index 4:   {OwnerId = 567, IsVisible =  false}

Before using VirtualQueryableCollectionView, we can easily iterate collection, but as VirtualQueryableCollectionView is loading items on demand, therefore I need to iterate collection on each load.

If I implement such evaluation in ItemsLoading or ItemsLoaded event, It hurts performance. I want suitable place, where itemsLoading is completed, new collection is rendered in gridview and then I can iterate collection.

Is it possible in VirtualQueryableCollectionView. Is it right way to handle such situation. What can be alternative.

 

Kamran
Top achievements
Rank 3
Iron
Iron
Veteran
 asked on 28 May 2022
2 answers
163 views

Hi Telerikers,

I would like to reduce the number of makers (basically I would display the makers only in the first, last, max and min values) . However, I don't want to simplify the data because that make change on the shape of line.

Would you please help me a solution to modify the display of makers? 

Many thanks for your help

minh
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 27 May 2022
1 answer
243 views

I have a RadComboBox with a list of items in ItemsSource
My SelectedValue is an int property and I display the corresponding string property from the list.

If the SelectedValue property is not in the list then it does not display anything.

Is there a way to set the display text in the RadComboBox when the SelectedValue is not in the ItemsSource list?

I've tried setting Text but it didn't work.

(note the RadComboBox is not editable)

Dilyan Traykov
Telerik team
 answered on 25 May 2022
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?