Telerik Forums
UI for WPF Forum
2 answers
177 views

Hi,
I have two checkboxs that, when checked, apply or remove custom filters.  The filters work fine (mostly), only problem is that the first time FilterDescriptors.Clear(); is called all the rows in the grid dissapear.  On any subsequent calls it works as expected.
 
Both checkboxes call the following method:  

#region private void HandleCheckBoxFilters()
private void HandleCheckBoxFilters()
{
    bool? PaidInFullChecked = CheckBox_PaidInFull.IsChecked;
    bool? Show60PaymentsOnlyChecked = CheckBox_FixedAmount.IsChecked;
 
    //RadGridView_TrusteeLedgers.FilterDescriptors.Clear();
 
    CompositeFilterDescriptor compositeDescriptor = new CompositeFilterDescriptor();
    compositeDescriptor.LogicalOperator = FilterCompositionLogicalOperator.And;
 
    RadGridView_TrusteeLedgers.FilterDescriptors.Clear();
 
    if (PaidInFullChecked == true)
    {
        FilterDescriptor filterDescriptor_PaidInFull = new FilterDescriptor();
        filterDescriptor_PaidInFull.Member = "PaidInFull";
        filterDescriptor_PaidInFull.Operator = FilterOperator.IsEqualTo;
        filterDescriptor_PaidInFull.Value = true;
        filterDescriptor_PaidInFull.IsCaseSensitive = false;
 
        compositeDescriptor.FilterDescriptors.Add(filterDescriptor_PaidInFull);
    }
 
 
    if (Show60PaymentsOnlyChecked == true)
    {
        FilterDescriptor filterDescriptor_FixedAmount = new FilterDescriptor();
        filterDescriptor_FixedAmount.Member = "TotalRemaining";
        filterDescriptor_FixedAmount.Operator = FilterOperator.IsEqualTo;
        filterDescriptor_FixedAmount.Value = Convert.ToDecimal(60);
        filterDescriptor_FixedAmount.IsCaseSensitive = false;
 
        compositeDescriptor.FilterDescriptors.Add(filterDescriptor_FixedAmount);
    }
 
    RadGridView_TrusteeLedgers.FilterDescriptors.Add(compositeDescriptor);
 
}
#endregion

Here is my Xaml

<DockPanel  Name="DockPanel_Content_CenterDock"  HorizontalAlignment="Stretch" Margin="2" Grid.Row="2" Grid.Column="0"  >
 
    <telerik:RadBusyIndicator x:Name="RadBusyIndicator_TrusteeLedgerContent" BusyContent="Loading data...">
 
        <telerik:RadGridView Name="RadGridView_TrusteeLedgers"
                            DataLoadMode="Asynchronous"
                            IsFilteringAllowed="False"
                            ShowGroupPanel="False"         
                            telerikControls:Theming.Theme="Office_Blue"
                            EnableRowVirtualization="True"
                            AutoGenerateColumns="False"
                            SelectionUnit="FullRow"
                            SelectionMode="Single" SelectionChanged="RadGridView_TrusteeLedgers_SelectionChanged">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="Case Number" DataMemberBinding="{Binding CaseNumber}" Width="100" IsReadOnly="True" />
                <telerik:GridViewDataColumn Header="Trustee" DataMemberBinding="{Binding TrusteeCode}" Width="75" IsReadOnly="True" />
                <telerik:GridViewDataColumn Header="Case Title" DataMemberBinding="{Binding CaseTitle}" Width="200" IsReadOnly="True" />
                <telerik:GridViewDataColumn Header="Prev Chapter" DataMemberBinding="{Binding PreviousChapter}" Width="75" IsReadOnly="True" />
                <telerik:GridViewDataColumn Header="Chapter" DataMemberBinding="{Binding Chapter}" Width="75" IsReadOnly="True" />
                <telerik:GridViewDataColumn Header="Closed" DataMemberBinding="{Binding CaseIsClosed, Converter={StaticResource BooleanToStringConverter}}" Width="75" IsReadOnly="True"  />
                <telerik:GridViewDataColumn Header="NoticeFiled" DataMemberBinding="{Binding NoticeFiled, Converter={StaticResource BooleanToStringConverter}}" Width="75" IsReadOnly="True"/>
                <telerik:GridViewDataColumn Header="PaidInFull" DataMemberBinding="{Binding PaidInFull, Converter={StaticResource BooleanToStringConverter}}" Width="75" IsReadOnly="True" />
                <telerik:GridViewDataColumn Header="Amount" DataMemberBinding="{Binding TotalRemaining}" DataFormatString="{}{0:c}" Width="75" IsReadOnly="True" />
                <telerik:GridViewColumn Header="Voucher" >
                    <telerik:GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <CheckBox IsChecked="{Binding VoucherRequested}" Width="75" />
                        </DataTemplate>
                    </telerik:GridViewColumn.CellTemplate>
                </telerik:GridViewColumn>
            </telerik:RadGridView.Columns>
            <telerik:RadGridView.SortDescriptors>
                <telerik:SortDescriptor Member="TransactionDate" SortDirection="Ascending"></telerik:SortDescriptor>
            </telerik:RadGridView.SortDescriptors>
            <!--<telerik:RadGridView.GroupDescriptors>
                <telerik:GroupDescriptor Member="OfficeName" SortDirection="Descending" DisplayContent="Office Name">
                    <telerik:GroupDescriptor.AggregateFunctions>
                        <telerik:SumFunction Caption="Office Total" SourceField="TotalNonRegistry" ResultFormatString="{}{0:c}"></telerik:SumFunction>
                    </telerik:GroupDescriptor.AggregateFunctions>
                </telerik:GroupDescriptor>
            </telerik:RadGridView.GroupDescriptors>-->
        </telerik:RadGridView>
 
    </telerik:RadBusyIndicator>
 
</DockPanel>

 

 

 

 

 

 

 

christine
Top achievements
Rank 1
 answered on 29 Sep 2011
2 answers
247 views
I am using a RadGridView where the ItemsSource is bound to a QueryableCollectionView that contains a RadObservableCollection of data.  The data is loaded asynchronously from a web service, so on return from the service, the collection is updated by calling Clear, then AddRange, and then Refresh is called on the QueryableCollectionView.

This was working great until we applied the hotfix from 9/27 which we needed to fix another issue in the rich text editor.  Once we applied the hotfix, the grid would not display any data in the rows, but would recognize the correct amount of data rows.  The grid also does not display any filter buttons in the headers, and there is no change to the header state when sort is applied.  I can see my data in the collection, but the grid won't display the cell contents.

This is also not working in the 9/20 build, but works fine in the 7/12 build and previous.

I cannot reproduce the problem by making synchronous calls to load data.  This only happens when the Refresh is applied after a callback.

Thanks for any help.

Edit:  Any columns where we override CreateCellElement are working.  GridViewDataColumn without the override is not working.
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
 answered on 29 Sep 2011
1 answer
70 views
Hi,

We are using GridViewSelectColumn in our TreelistView and each time when data loaded the first item in the list selected(check box is checked). Is it default behavior if not how to turn off this behavior ?

Thank you,
Julian
Julian
Top achievements
Rank 1
 answered on 29 Sep 2011
1 answer
121 views
Hi,

I there an easy way to hide/disable the left/top/right/botttom indicators on the RootCompass ?
I need to:
1.  avoid users from docking on the outer edges of the RadDocking area
2. only allow docking on the RadPaneGroup (left/top/right/botttom) within the RadDocking

I know how to enable/disable left/top/right/botttom indicators on the Compass, but I don't know how to do this on the RootCompass

Please advice...
Terje Johansen
Top achievements
Rank 1
 answered on 29 Sep 2011
4 answers
121 views

Hello,

in my simple example i have a RadPanelBar with three RadPanelBarItems.
The default behavior of the items is to expand on selection. This is fine for me.

Now I want the user to confirm the change of the selection of the RadPanelBarItems.
Therefore I use a MessageBox in the PreviewSelectionChanged event of the RadPanelBar.

The confirmation logic works fine but the selected item is not expanded after confirmation.
This behavior is different to the default.

Regards
Rainer

The sample code:

<Window x:Class="RadPanelBarItemSelection.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <telerik:RadPanelBar x:Name="pbItems" 
                             ScrollViewer.HorizontalScrollBarVisibility="Auto"
                             ScrollViewer.VerticalScrollBarVisibility="Auto"
                             SelectionMode="Single"
                             IsExpandOnSingleClickEnabled="True"
                             PreviewSelectionChanged="pnlEditorialSysItems_PreviewSelectionChanged">
              
            <telerik:RadPanelBarItem Header="Item1">
                <Border Background="Blue" Height="100">
                    <TextBlock Text="Item1"/>
                </Border>
            </telerik:RadPanelBarItem>
  
            <telerik:RadPanelBarItem Header="Item2">
                <Border Background="Red" Height="100">
                    <TextBlock Text="Item2"/>
                </Border>
            </telerik:RadPanelBarItem>
  
            <telerik:RadPanelBarItem Header="Item3">
                <Border Background="Green" Height="100">
                    <TextBlock Text="Item3"/>
                </Border>
            </telerik:RadPanelBarItem>
        </telerik:RadPanelBar>
    </Grid>
</Window>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Telerik.Windows.Controls;
  
namespace RadPanelBarItemSelection {
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window {
        public MainWindow() {
            InitializeComponent();
        }
  
        private void pnlEditorialSysItems_PreviewSelectionChanged(object sender, SelectionChangedEventArgs e) {
            if (MessageBoxResult.Yes == MessageBox.Show("Cancel selection ?", "Cancel", MessageBoxButton.YesNo, MessageBoxImage.Question)) {
                e.Handled = true;
            }
        }
    }
}



Rainer
Top achievements
Rank 1
 answered on 29 Sep 2011
3 answers
227 views
For an application on which I'm working, I want to export all appointments from a ScheduleView to an ICalendar format.  By following the ICal example provided in the  WPF Q2 2011 Demos, I have been able to successfully export all of my appointments using the AppointmentCalendarExporter.  

My next step was to create some exceptions to a recurring appointment, and try to export those.  This is where I ran into some problems.  If I create an exception which simply excludes an occurrence of a recurring appointment, then I can still export the recurring appointment to an ICalendar format (file or string), and the exclusion is represented in the ICal content like so:  "EXDATE:20110923T050000".  However, if I create an exception in which I change the time of an occurrrence of a recurring appointment (per the example here), then attempting to export the appointment to an ICal format results in a StackOverflowException.

Any idea what's going on here?
Yana
Telerik team
 answered on 29 Sep 2011
6 answers
178 views
Hi,

I have selected a cell and I want fetch the value of the previous cell of the selected cell. Please let me know how can be get that.

Thanks,
Ramasamy
Maya
Telerik team
 answered on 29 Sep 2011
1 answer
110 views
I have previously used RadDock in Telerik Winforms. When adding a dock window it had context menu options such as close, close all but this, close all, New Horizontal Tab Group.

Also on the right hand corner of the raddock, there was a dropdown with a list of all open document windows.

Are these features available in WPF docking?
George
Telerik team
 answered on 29 Sep 2011
2 answers
193 views
Hi
I just need 2 WPF controls. Is it possible to buy only 2 of them?

Best regards
Michael
Michael
Top achievements
Rank 1
 answered on 28 Sep 2011
4 answers
115 views

Hi, I am using RadControls for WPF (Q2 2011), in particular the GridView control. I am aware this control includes a cool looking dialog for filtering the data for each column however due to the fact I am trying to implement custom paging using Entity Framework I would also like to customise the look of the filter dialog, is this possible and if so please explain how.

I'd like to keep the section whereby one is able to filter the results by text search etc. but I don’t want to display the top section allowing the user to select the specific items in the collection. Hope that makes sense, I would send a screen shot however I don’t think its possible here??

Thanks in advance

 

Michael
Top achievements
Rank 1
 answered on 28 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?