Telerik Forums
UI for WPF Forum
1 answer
10 views

How do I declare these properties in a resource dictionary instead of code? I can't quite get the proper syntax.

FluentPalette.Palette.DisabledOpacity = 0.5; 
FluentPalette.Palette.ReadOnlyOpacity = 0.4; 
Martin Ivanov
Telerik team
 answered on 05 Jul 2024
2 answers
16 views

Say I have a RadGridView bound to this class:

    public class UserActivityNoteDTO
    {
        public Guid ActivityNoteId { get; set; }
        public string ActivityType { get; set; }
        public string ActivityStage { get; set; }
        public string EntityId { get; set; }
        public string MemberId { get; set; }

   }

When a cell is clicked I need to get the ActivityNoteId and what was clicked and the value.  So if I click a member id, I need to get the ActivityNoteId and MemberId and know MemberId was clicked (and not EntityId).

I've seen examples where you can get the rowitem or cell value but not both.

Neil N
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 04 Jul 2024
1 answer
14 views

Hi,

I have the attached hierarchical RadGridView.

In this I want to implement, that users can delete a single child and also that they can delete a parent.
Now in the way I thought it would work, if you press the Delte Key on the Keyboard, it triggers both events.

Is there a way to prevent this from happening?
And if not, how would I check if the event was triggered by a the child RadGridView or the parent?

 

Greetings,

Benedikt

        <telerik:RadGridView
            Grid.Row="1"
            x:Name="rgvAbschlagsRechnungenAlteSysteme"
            AutoGenerateColumns="False"
            GroupRenderMode="Flat"
            ShowGroupPanel="False"
            FilteringMode="Popup"
            ShowSearchPanel="False"
            CanUserSearch="False"
            ValidatesOnDataErrors="InEditMode"
            ItemsSource="{Binding Daten}"
            AlternationCount="2"
            ActionOnLostFocus="CommitEdit"
            CanUserDeleteRows="True"
            IsSynchronizedWithCurrentItem="True"
            ShowColumnFooters="True"
            SelectionMode="Extended"
            IsPropertyChangedAggregationEnabled="False"
            VirtualizingPanel.VirtualizationMode="Recycling"
            SelectedItem="{Binding selEintrag}"
            NewRowPosition="Top"
            AddingNewDataItem="rgvAbschlagsRechnungenAlteSysteme_AddingNewDataItem"
            RowEditEnded="rgvAbschlagsRechnungenAlteSysteme_RowEditEnded"
            Deleting="rgvAbschlagsRechnungenAlteSysteme_Deleting"
            >
            <telerik:RadGridView.ChildTableDefinitions>
                <telerik:GridViewTableDefinition />
            </telerik:RadGridView.ChildTableDefinitions>
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn
                    DataMemberBinding="{Binding RechnungsNr}"
                    Header="Rechnung Nr."
                    TextWrapping="Wrap"
                    HeaderTextWrapping="Wrap"
                    Width="100"
                    >
                    <telerik:GridViewDataColumn.CellEditTemplate>
                        <DataTemplate>
                            <telerik:RadMaskedTextInput
                                Value="{Binding RechnungsNr, Mode=TwoWay, UpdateSourceTrigger=Explicit}"    
                                maskedInput:MaskedInputExtensions.MaxTextLength="255"
                                Mask=""
                                MinWidth="100"
                                InputBehavior="Insert"
                                IsClearButtonVisible="False"
                                />
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellEditTemplate>
                    <telerik:GridViewDataColumn.AggregateFunctions>
                        <telerik:CountFunction Caption="Anzahl:  " ResultFormatString="{}{0:N0}" />
                    </telerik:GridViewDataColumn.AggregateFunctions>
                </telerik:GridViewDataColumn>
                <telerik:GridViewComboBoxColumn
                    DataMemberBinding="{Binding RechnungsArt}"
                    Header="Rechnungs-Art"
                    HeaderTextWrapping="Wrap"
                    TextWrapping="Wrap"
                    ItemsSource="{Binding RechnungsArten}"
                    />
                <telerik:GridViewComboBoxColumn
                    DataMemberBinding="{Binding selVertriebsBereich}"
                    Header="Vertriebs-Bereich"
                    HeaderTextWrapping="Wrap"
                    TextWrapping="Wrap"
                    ItemsSourceBinding="{Binding VertriebsBereiche}"
                    DisplayMemberPath="Bezeichnung"
                    FilterMemberPath="selVertriebsBereich.Bezeichnung"
                    SortMemberPath="selVertriebsBereich.Bezeichnung"
                    />
                <telerik:GridViewDataColumn
                    DataMemberBinding="{Binding DebitorenNummer}"
                    Header="Debitoren Nr."
                    TextWrapping="Wrap"
                    HeaderTextWrapping="Wrap"
                    Width="100"
                    >
                    <telerik:GridViewDataColumn.CellEditTemplate>
                        <DataTemplate>
                            <telerik:RadMaskedTextInput
                                Value="{Binding DebitorenNummer, Mode=TwoWay, UpdateSourceTrigger=Explicit}"    
                                maskedInput:MaskedInputExtensions.MaxTextLength="255"
                                Mask=""
                                MinWidth="100"
                                InputBehavior="Insert"
                                IsClearButtonVisible="False"
                                />
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellEditTemplate>
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn
                    DataMemberBinding="{Binding FirstAuftrag.Objekt}"
                    Header="Objekt"
                    IsReadOnly="True"
                    TextWrapping="Wrap"
                    HeaderTextWrapping="Wrap"
                    Width="200"
                    />
                <telerik:GridViewDataColumn 
                    DataMemberBinding="{Binding FirstAuftrag.BA}"
                    Header="BA-Nr."
                    IsReadOnly="True"
                    TextWrapping="Wrap"
                    HeaderTextWrapping="Wrap"
                    Width="155"
                    />
                <telerik:GridViewColumn 
                    UniqueName="AuftragHinzufügenButton"
                    Header="Auftrag hinzufügen"
                    IsReadOnly="True"
                    TextWrapping="Wrap"
                    HeaderTextWrapping="Wrap"
                    FilterMemberPath="BA"
                    Width="180"
                    >
                    <telerik:GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <telerik:RadButton 
                                Content="Auftrag hinzufügen"
                                Command="{Binding AuftragHinzufügenCommand}" 
                                />
                        </DataTemplate>
                    </telerik:GridViewColumn.CellTemplate>
                </telerik:GridViewColumn>
            </telerik:RadGridView.Columns>
            <telerik:RadGridView.HierarchyChildTemplate>
                <DataTemplate>
                    <telerik:RadGridView 
                        AutoGenerateColumns="False"
                        GroupRenderMode="Flat"
                        ShowGroupPanel="False"
                        FilteringMode="Popup"
                        ShowSearchPanel="False"
                        CanUserSearch="False"
                        ValidatesOnDataErrors="InEditMode"
                        ItemsSource="{Binding Aufträge}"
                        AlternationCount="2"
                        ActionOnLostFocus="CommitEdit"
                        CanUserDeleteRows="True"
                        IsSynchronizedWithCurrentItem="True"
                        ShowColumnFooters="False"
                        SelectionMode="Extended"
                        IsPropertyChangedAggregationEnabled="False"
                        VirtualizingPanel.VirtualizationMode="Recycling"
                        Deleting="RadGridView_Deleting"
                        >
                        <telerik:RadGridView.Columns>
                            <telerik:GridViewDataColumn
                                DataMemberBinding="{Binding Objekt}"
                                Header="Objekt"
                                IsReadOnly="True"
                                TextWrapping="Wrap"
                                HeaderTextWrapping="Wrap"
                                Width="200"
                                />
                            <telerik:GridViewDataColumn 
                                DataMemberBinding="{Binding BA}"
                                Header="BA-Nr."
                                IsReadOnly="True"
                                TextWrapping="Wrap"
                                HeaderTextWrapping="Wrap"
                                Width="155"
                                />
                        </telerik:RadGridView.Columns>
                    </telerik:RadGridView>
                </DataTemplate>
            </telerik:RadGridView.HierarchyChildTemplate>
            <telerik:RadGridView.SortDescriptors>
                <telerik:ColumnSortDescriptor Column="{Binding Columns[\RechnungsNr], ElementName=rgvAbschlagsRechnungenAlteSysteme}" SortDirection="Ascending"/>
            </telerik:RadGridView.SortDescriptors>
        </telerik:RadGridView>


Martin Ivanov
Telerik team
 answered on 04 Jul 2024
0 answers
7 views
I'd like to know if I can make it so tables and images always fill width of RichTextBox.

I have a RichTextBox control that is not very wide and I want text to wrap and not give them a horizontal scrollbar. I can't set an explicit width as this needs to be dynamic. Is there anyway that I can make it so that tables/ pictures are inline and always occupy the entire width?
Patrick
Top achievements
Rank 1
Iron
Iron
Iron
 asked on 03 Jul 2024
0 answers
9 views

Hi!  I am seeking assistance with this column in WPF, in a RadGridView:

<telerik:GridViewDataColumn DataMemberBinding="{Binding TargetDateET, StringFormat={}{0:MM/dd HH:mm}}" Header="Target Date" />

It displays DateTime values in the grid in the following format: "MM/dd HH:mm"

The issue is that the FilterDescriptor is in this format: "MM/dd/yyyy HH:mm:ss tt"

And when the filters are saved and presented to the user, they are different.



What I can do to manage this data in the same format? (Without having to generate a new variable that is a string and that returns the correct format) Help! Thanks in advance! Juan

Pablo
Top achievements
Rank 1
 updated question on 03 Jul 2024
1 answer
23 views
1.148 / 5.000
With the RadGridView, the binding for ItemsSource works perfectly and the data is displayed correctly. However, if I want to create a FilterDescriptor when a text box changed in the code-behind, I get a System.ArgumentException with the message 'Source type must be an enumerable type.' when executing the Add statement in the code

rgv.FilterDescriptors.Clear();

rgv.FilterDescriptors.LogicalOperator = FilterCompositionLogicalOperator.Or;

var cfd = new FilterDescriptor("columnName", FilterOperator.Contains, filterTxtBx.Text);

rgv.FilterDescriptors.Add(cfd);

with the stack trace

   at Telerik.Windows.Data.Expressions.EnumerableFilterOperatorExpressionBuilder.GenerateContainsMethodCall(Expression source, Expression value, Boolean shouldNegate)
   at Telerik.Windows.Data.Expressions.EnumerableFilterOperatorExpressionBuilder.GenerateContains(Expression left, Expression right)
   at Telerik.Windows.Data.Expressions.FilterOperatorExpressionBuilderBase.CreateExpression(Expression left, Expression right)
   at Telerik.Windows.Data.Expressions.OperatorValueFilterDescriptorExpressionBuilderBase.CreateBodyExpressionThreadSafe()
   at Telerik.Windows.Data.Expressions.OperatorValueFilterDescriptorExpressionBuilderBase.CreateBodyExpression()
   at Telerik.Windows.Data.FilterDescriptor.CreateFilterExpression(ParameterExpression parameterExpression)
   at Telerik.Windows.Data.FilterDescriptorBase.CreateFilterExpression(Expression instance)
   at Telerik.Windows.Data.Expressions.FilterDescriptorCollectionExpressionBuilder.CreateBodyExpressionThreadSafe()
   at Telerik.Windows.Data.Expressions.FilterDescriptorCollectionExpressionBuilder.CreateBodyExpression()
   at Telerik.Windows.Data.Expressions.FilterExpressionBuilder.CreateFilterExpression()
   at Telerik.Windows.Data.QueryableExtensions.Where(IQueryable source, CompositeFilterDescriptorCollection filterDescriptors)
   at Telerik.Windows.Data.QueryableCollectionView.CreateView()
   at Telerik.Windows.Data.QueryableCollectionView.CreateInternalList()
   at Telerik.Windows.Data.QueryableCollectionView.get_InternalList()
   at Telerik.Windows.Data.QueryableCollectionView.get_InternalCount()
   at Telerik.Windows.Data.QueryableCollectionView.get_IsEmpty()
   at Telerik.Windows.Data.DataItemCollection.get_IsEmpty()
   at Telerik.Windows.Controls.GridView.BaseItemsControl.OnItemsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.OnItemsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Controls.DataControl.OnItemsCollectionChangedDispatch(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.DataItemCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.DataItemCollection.OnCollectionViewCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.Listener`2.ReceiveWeakEvent(Object sender, TArgs args)
   at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)
   at Telerik.Windows.Data.QueryableCollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
   at Telerik.Windows.Data.QueryableCollectionView.RefreshOverride()
   at Telerik.Windows.Data.QueryableCollectionView.RefreshOrDefer()
   at Telerik.Windows.Data.QueryableCollectionView.InvalidatePagingAndRefresh()
   at Telerik.Windows.Data.QueryableCollectionView.OnFilterDescriptorsChanged()
   at Telerik.Windows.Data.QueryableCollectionView.OnFilterDescriptorsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
   at Telerik.Windows.Data.RadObservableCollection`1.InsertItem(Int32 index, T item)
   at Telerik.Windows.Data.FilterDescriptorCollection.InsertItem(Int32 index, IFilterDescriptor item)
   at System.Collections.ObjectModel.Collection`1.Insert(Int32 index, T item)
   at System.Collections.ObjectModel.Collection`1.System.Collections.IList.Insert(Int32 index, Object value)
   at Telerik.Windows.Data.CollectionHelper.Insert(IList target, IEnumerable newItems, Int32 startingIndex, IEqualityComparer itemComparer)
   at Telerik.Windows.Data.ObservableCollectionManager.HandleCollectionChanged(IList sender, NotifyCollectionChangedEventArgs args)
   at Telerik.Windows.Data.ObservableCollectionManager.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs args)
   at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
   at Telerik.Windows.Data.RadObservableCollection`1.InsertItem(Int32 index, T item)
   at Telerik.Windows.Data.FilterDescriptorCollection.InsertItem(Int32 index, IFilterDescriptor item)
   at System.Collections.ObjectModel.Collection`1.Add(T item)

But why an enumerable type is suddenly needed here is a mystery to me. Because the ItemsSource is enumerable anyway and the designer-generated data set classes for the items are not. How, above all, does he come to the strange assumption that such a type is suddenly needed here when the display has been working correctly and without problems up until then?
Daniel
Top achievements
Rank 1
Iron
 answered on 02 Jul 2024
0 answers
12 views

When Static header are enabled and few columns are fixed, 
Scenario:


1.If the Start and End Dates range are more than 1 month, the data is not exactly aligned with the Header dates after scrolling towards right.

2.If filter is applied, then the footer is displayed at very bottom. 

sandurpoojitha
Top achievements
Rank 1
 asked on 02 Jul 2024
0 answers
11 views
CustomFindReplace, SpellCheckingDialogAttribute classes are not found inside using Telerik.Windows.Documents.UI.Extensibility; after I upgraded the wpf from net framework to net core. It works in my same net framework project.
Sagar
Top achievements
Rank 1
 asked on 28 Jun 2024
1 answer
15 views

Having an issue displaying images in a radRichTextBox. Below is my HTML. 

I have using an HTMLDataProvider to bind to a string that contains this HTML below.

The image does not display, all I get is this little box for the image.

The text all displays fine above it.

 


<head>
<link rel="stylesheet" href="../style.css" /> 
</head>
<p><strong>Section Header</strong></p>

<p><strong>Section Text</strong> This is my Description section</p>

<p><strong>Picture Title</strong></p>
<p><img src="../LocalFolderParent/Images/MyImage.png" alt="Figure 1 - Test 3" /></p>

Stenly
Telerik team
 answered on 28 Jun 2024
4 answers
255 views

After installing release 2022.2.511, the distinct filters of our grid views stopped working.  We are using popup filters in a custom class with both distinct checkboxes and field filters visible.  Clicking on any distinct checkbox and then clicking Apply Filter button would always filter the grid, but after the 2022.2.511 release, clicking on distinct checkboxes and clicking Apply Filter now does nothing but close the filter popup with no effect to the results.  However, if the EnableDistinctValuesFiltering property is set to true, and some text is typed in the distinct search text box, and then the checkbox is checked and Apply Filter is clicked, the filtering works.

Is there some breaking change that was made that we should know about when dealing with distinct filters in the custom popup?  Is there any settings that we can try to help resolve this issue?

Thanks, Bob

Oksana
Top achievements
Rank 1
Iron
 answered on 26 Jun 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Michael
Top achievements
Rank 2
Iron
Wilfred
Top achievements
Rank 1
Alexander
Top achievements
Rank 2
Iron
Iron
Matthew
Top achievements
Rank 1
Iron
ibra
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Michael
Top achievements
Rank 2
Iron
Wilfred
Top achievements
Rank 1
Alexander
Top achievements
Rank 2
Iron
Iron
Matthew
Top achievements
Rank 1
Iron
ibra
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?