Telerik Forums
UI for WPF Forum
5 answers
842 views

I am using a style to color gridview column headers when a filter is applied to the gridview or when it is removed to change the color back to the default.  I save filters etc. using the persistence manager.  When I reload the gridview settings via the persistence manager the Filtered event does not fire. Is there a method that would replicate the adding of the filter or am I able to iterate the columns collection to identify the filtered columns?

 

Regards,

Joe

Stefan Nenchev
Telerik team
 answered on 25 Apr 2017
3 answers
360 views

So I have two gridsplitters in my app and I want to persist wherever the user drags them across sessions.  This mostly works but sometimes I seem to get this error whilst I am moving a gridsplitter and it locks and crashes the app:

An infinite loop appears to have resulted from repeatedly invalidating the TimeManager during the Layout/Render process

I don't know if this is a wild goose chase with the gridsplitters, but whenever I go back into the app, the gridsplitter positions revert back to their default positions and I haven't noticed it happen with any of the other controls that use the persistence framework.

 

So on my usercontrol with both gridsplitters I have the following code :

ServiceProvider.RegisterPersistenceProvider<ICustomPropertyProvider>(typeof(RadGridView), new GridViewCustomPropertyProvider());
SplitterCustomPropertyProvider splitterPropProvider = new SplitterCustomPropertyProvider();
 
ServiceProvider.RegisterPersistenceProvider<ICustomPropertyProvider>(typeof(RowDefinition), splitterPropProvider);
ServiceProvider.RegisterPersistenceProvider<ICustomPropertyProvider>(typeof(ColumnDefinition), splitterPropProvider);

 

SplitterCustomPropertyProvider is as so:

public class SplitterCustomPropertyProvider : ICustomPropertyProvider
 {
   public CustomPropertyInfo[] GetCustomProperties()
   {
     // Create custom property to persist the pixels property on a column/row definition
     return new CustomPropertyInfo[]
     {
       new CustomPropertyInfo("GridSplitterPixels", typeof(double)),
     };
   }
 
   public void InitializeObject(object context)
   {
   }
 
   public object InitializeValue(CustomPropertyInfo customPropertyInfo, object context)
   {
     return null;
   }
 
   public object ProvideValue(CustomPropertyInfo customPropertyInfo, object context)
   {
     GridSplitterProxy proxy = new GridSplitterProxy();
     if (context is RowDefinition)
     {
       RowDefinition row = context as RowDefinition;
       proxy.Pixels = row.ActualHeight;
       return proxy;
     }
     else if (context is ColumnDefinition)
     {
       ColumnDefinition row = context as ColumnDefinition;
       proxy.Pixels = row.ActualWidth;
       return proxy;
     }
 
     return null;
   }
 
   public void RestoreValue(CustomPropertyInfo customPropertyInfo, object context, object value)
   {
     GridSplitterProxy proxy = value as GridSplitterProxy;
 
     if (context is RowDefinition)
     {
       RowDefinition row = context as RowDefinition;
       if (proxy.Pixels == 0)
         row.Height = new GridLength(1, GridUnitType.Auto);
       else
         row.Height = new GridLength(proxy.Pixels);       
     }
     else if (context is ColumnDefinition)
     {
       ColumnDefinition col = context as ColumnDefinition;
       if (proxy.Pixels == 0)
         col.Width = new GridLength(1, GridUnitType.Auto);
       else
         col.Width = new GridLength(proxy.Pixels);
     }
   }
 
   private class GridSplitterProxy
   {
     public double Pixels { get; set; }
   }
 }

 

The loading of the gridsplitter positions is done on the UserControl_Loaded event :

IsolatedStorageProvider isoStorageProvider = new IsolatedStorageProvider();
isoStorageProvider.LoadFromStorage();

And the saving of the positions is done on the MainWindow_Closing event :

IsolatedStorageProvider isoStorageProvider = new IsolatedStorageProvider();
isoStorageProvider.SaveToStorage();

 

Any ideas as to why I'm getting this error?

 

 

 

Petar Mladenov
Telerik team
 answered on 25 Apr 2017
2 answers
150 views

We use the following code to put a filter on tree items which work great intially.

snip .....

TreeListView.FilterDescriptors.SuspendNotifications();
ClearFilters();

ApplyFilter(Reflector.GetProperty<ProjectReleaseLineViewModel>((line) => line.HasError).Name, true, FilterOperator.IsEqualTo);

snip ......

 

private void ClearFilters()
{
           foreach (var column in TreeListView.Columns.OfType<Telerik.Windows.Controls.GridViewBoundColumnBase>())
           {
                var filterControl = column.FilteringControl as ColumnFilterControl;
if (filterControl != null)
{
filterControl.Reset(column);
}
}
}

private void ApplyFilter(string member, object value, FilterOperator @operator = FilterOperator.IsEqualTo)
{
var filter = new CompositeFilterDescriptor();
filter.FilterDescriptors.Add(new FilterDescriptor(member, @operator, value));
var colum = TreeListView.Columns.OfType<GridViewBoundColumnBase>().Skip(2).First();
colum.DataControl.FilterDescriptors.Add(filter);
}

When performing this action the tree explands showing the lines which have errors.

The strange behaviour happens after that through the following actions.

- The use manually collapses the expanded items al the way to level zero

- Then the filter is cleared through the following code

 

 

Johan
Top achievements
Rank 1
 answered on 25 Apr 2017
1 answer
672 views

How to implement Telerik checkbox in WPF to trigger functions while still remembering original state?

I have a checkbox that when checked should exclude an item in a RadGridView while still remembering the state (of the item being included), so if (or when) a user unchecks the checkbox, the item is included back in the list within the RadGridView. Essentially setting the original data back when unchecked to revert back to original data.

Stefan
Telerik team
 answered on 24 Apr 2017
1 answer
264 views

Hi!

When I create a ConditionalDataTemplateSelector to use as CellTemplateSelector in a GridView, I have to specify the name of the field in my DataTemplateRule like this:

<telerik:ConditionalDataTemplateSelector x:Key="PriceSelectedSelector">
        <telerik:DataTemplateRule Condition="IsSelected = False OR IsSelected = null" Template="t1" />
        <telerik:DataTemplateRule Condition="IsSelected = True" Template="t2" />
</telerik:ConditionalDataTemplateSelector>

But if I have a lot of columns that are just true/false I have to create a new ConditionalTemplateSelector for each and every column. Is there a way to build this in a more general way like "If the value in this cell is true, take template t1" so I could use my ConditionalTemplateSelector on different columns regardless of the name of the field?

Regards
Heiko

Stefan Nenchev
Telerik team
 answered on 24 Apr 2017
1 answer
140 views

Dear Telerik Team,

I've been playing with TileList for a while and it seems like the items virtualization does not work despite it is using an items panel that *should* allow virtualization. the documentation does not state whether TileList does support virtualization (it does for few other controls).

Cheers, Greg

Stefan Nenchev
Telerik team
 answered on 24 Apr 2017
1 answer
142 views
Hello. I use RadDataForm component in my DataTemplate and create custom DataFormCommandProvider for it, but it doesn't work.
Dilyan Traykov
Telerik team
 answered on 21 Apr 2017
8 answers
368 views
I have a grid which displays a listing of records on a TabControl.  A second tab displays the detail for the selected record on the grid.  This all works fine except when I go back to the grid list tab, the grid is blank.  The data is there because if I click a different record and move to the detail tab it displays that corresponding data.  Also, if I page down and then back up the grid will redisplay the data correctly.  So it's definitely just a display issue.  Any ideas?

Thanks,
-Sid Meyers.
Dilyan Traykov
Telerik team
 answered on 21 Apr 2017
8 answers
577 views
Hi There,

I have a problem with RadPanes isHidden property, i want to set IsHidden by using a binding, but when i do this it is not working, but if i set the IsHidden="True" at XAML then its working properly, can you please guide me in this case ?

Thanks in advance,
Srinivas.
AEDT developer
Top achievements
Rank 1
 answered on 21 Apr 2017
2 answers
694 views

Hi Team,

I have used the RadSplitButton to show the drop down along with button. But the drop down popup is opened outside window, please share any idea to load the popup only within window. Please refer the below code 

 

<telerik:RadSplitButton Margin="20,152,0,0"
                        Foreground="#8F8F8F"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                                Content="DROP DOWN">
    <telerik:RadSplitButton.DropDownContent>
        <StackPanel Orientation="Vertical">
            <telerik:RadListBox ItemsSource="{Binding AddressBooks}"
                                        BorderThickness="0">
                <telerik:RadListBoxItem>AAA AAA AAA AAA</telerik:RadListBoxItem>
                <telerik:RadListBoxItem>BBB BBB BBB BBB</telerik:RadListBoxItem>
                <telerik:RadListBoxItem>CCC CCC CCC CCCC CCC</telerik:RadListBoxItem>
            </telerik:RadListBox>
            <Button Content="ADD NEW"
                            BorderThickness="0,1,0,0"/>
        </StackPanel>
    </telerik:RadSplitButton.DropDownContent>
</telerik:RadSplitButton>

 

Please refer the attached image to know more about the issue. And I am using Windows 8.1 OS.

 

Regards,

Antony Raj

 

Antony
Top achievements
Rank 1
 answered on 21 Apr 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
Expander
Slider
TileList
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?