Telerik Forums
UI for WPF Forum
1 answer
131 views
I am trying to use IResource to create custom resources but can not make it work no appointments are displayed, all the resources are displayed in the group headers but no appointments, I have created a class that inherits from IResource and i am setting all the properties (resource name, resource type and display name), I am loading appointments from xaml just like the demo examples and there are i am using my custom class as resource.
I even added group and appointment filter to see what is wrong but they are never even called.

If i use simple Resource class then every thing works

Thanks
vikas
Yana
Telerik team
 answered on 27 Oct 2014
2 answers
244 views
I have this message while printing a particular PDF: https://drive.google.com/file/d/0BzXenGGVXpm3Nm9jUDNlTXRGNG8/view?usp=sharing

The error stack is:

System.ArgumentNullException was unhandled
Message: An unhandled exception of type 'System.ArgumentNullException' occurred in Telerik.Windows.Zip.dll
Additional information: Value cannot be null.

Other PDF prints fine. How do I resolve it ? Any suggestion on what to look at ?

Other information:
----------------
Teleriks RadControls version 2014.2.729.40
Telerik.Windows.Zip.dll: version 2014.2.729.40
ASP.NET 4.0
Visual Studio 2013
Windows 7 x64
Kammen
Telerik team
 answered on 27 Oct 2014
1 answer
431 views
I am having problem in binding to the Datacontext at viewdefinition level, It works if i create my viewmodel in xaml and set the DataContext of the grid using staticresource, but if i set the datacontext to the window in code behind it does not work

            <schedule:RadScheduleView.ViewDefinitions>
                <schedule:DayViewDefinition GroupFilter="{Binding GroupFilter2}"/>
                <schedule:WeekViewDefinition GroupFilter="{Binding GroupFilter2}"/>
                <schedule:MonthViewDefinition GroupFilter="{Binding GroupFilter2}"/>
            </schedule:RadScheduleView.ViewDefinitions>

----------- this does not work, does no bind to Group Filter -----------------
public MainWindow()
        {
            InitializeComponent();
            this.DataContext = new ViewModel();
        }


----------- this works -------------------

<Window.Resources>
        <local:ViewModel x:Key="ViewModel" AppointmentsSource="/Schedule;component/Appointments.xaml" />
<Grid x:Name="mainGrid" DataContext="{StaticResource ViewModel"> 
Kalin
Telerik team
 answered on 27 Oct 2014
3 answers
230 views
I think it would be cool to have the filtered choices in my combobox to have the matching text highlighted.

For example:
[at         ]
Documentation
Ultimate
Administrator
Cat in the Hat

Any suggestions on how to go about this?
Kalin
Telerik team
 answered on 27 Oct 2014
6 answers
488 views
Hi,

Is it possible to put the selectcolumn or check box into the Group Header?

When the check box in the group header is selected, I will like all the select columns(checkboxes) ticked of the items within the groups.

and when any item in the group is unchecked, I would like the check box in group header is unchecked as well.

When the group has subgroups, I also want the subgroup checkbox to be checked when I loop through them using group.subgroups.

In the case, how could I grad a reference to the checkbox in the subgroup row?

Am I using the right approch with the code below?

<telerik:RadGridView.GroupHeaderTemplate>
               <DataTemplate>
                   <StackPanel Orientation="Horizontal">
                       <CheckBox Click="RadGridViewGroupRowClicked" Margin="0 0 3 0"/>
                       <TextBlock Text="{Binding Group.Key}" />
                   </StackPanel>
               </DataTemplate>
           </telerik:RadGridView.GroupHeaderTemplate>



           private void RadGridViewGroupRowClicked(object sender, System.Windows.RoutedEventArgs e)
        {
            var groupViewModel = (sender as CheckBox).DataContext as GroupViewModel;
            var isChecked = (bool) (sender as CheckBox).IsChecked;
  
            CheckUncheckRows(isChecked, groupViewModel);
        }
  
        public void CheckUncheckRows(bool isChecked, GroupViewModel groupViewModel)
        {
            CheckUncheckItems(isChecked, groupViewModel.Group); 
        }
  
        public void CheckUncheckItems(bool isChecked, IGroup group)
        {
            if (group.HasSubgroups)
            {
                foreach (var subgroup in group.Subgroups)
                {
                    CheckUncheckItems(isChecked, subgroup);
                }
            }
            else
            {
                foreach (var item in group.Items)
                {
                    if (isChecked)
                    {
                        baseToTargetGridView.SelectedItems.Add(item);
                    }
                    else
                    {
                        baseToTargetGridView.SelectedItems.Remove(item);
                    }
                }
            }
        }


Thanks,

Yu
Inger Marie
Top achievements
Rank 1
 answered on 27 Oct 2014
4 answers
499 views
Hi,

i use the TabControl and i want to change the Style of the Header like the attached pic.
How can ein solve this?
As you can see there is a space before the first TabItem and in the BAckground you
can see some Information and some buttons.

THanks a lot
Best Regards
Rene
ITA
Top achievements
Rank 1
 answered on 26 Oct 2014
2 answers
259 views
Hi, I'm grouping my list of values from an object. 
This object might be one of these 3 classes: Class1, Calss2, Calss3. This is working.

I followed your sample: http://www.telerik.com/forums/group-header-style for a custom header template.

But when I'm selecting the template from each group header I find the string "Class1", "Calss2", "Calss3" instead of its real value.

What am I doing wrong? Am I missing something?
Martin Ivanov
Telerik team
 answered on 24 Oct 2014
5 answers
1.4K+ views

What I try to achieve is to apply a filter to my RadGridView whenever user checks / unchecks a checkbox (pretty straightforward, right?). My code works fine when I set the AutoGenerateColumns flag of my gridview to True, but does nothing when I switch the flag to False (the IsActive flag of my ColumnFilterDescriptor never changes to True). I need to apply a specific template to my columns so the AutoGenerateColumns flag has to be False. Both of the columns I try to filter have the IsFilterable flag to True and are binded to a string (and not a custom defined class). Here is my RadGridView:

<Merging:RadGridViewWithSelectedItemsEditable
      x:Name="SelectedUserAttributesGridView"
      Grid.Row="0"
           ItemsSource="{Binding MergeDetailsViewModel}" 
      AutoGenerateColumns="False" 
           VerticalAlignment="Top" 
           CanUserDeleteRows="False"
           CanUserFreezeColumns="False"
           SelectionMode="Extended"
      ScrollMode="Deferred"                          
      CanUserInsertRows="False" 
      CanUserReorderColumns="True" 
      CanUserResizeColumns="True" 
      CanUserSelect="False" 
      CanUserSortColumns="False" 
      ShowGroupPanel="False" 
      FrozenColumnsSplitterVisibility="Hidden" 
      GridLinesVisibility="None"                             
      RowIndicatorVisibility="Collapsed"                    
      IsEnabled="{Binding MergeDetailsEnabled}">
 
                   <Merging:RadGridViewWithSelectedItemsEditable.Columns>
                       <telerik:GridViewColumn Header="Well">
                           <telerik:GridViewColumn.CellTemplate>
                               <DataTemplate>
                                   <TextBlock VerticalAlignment="Center" Margin="3,0,3,0" Text="{Binding WellName}"  />
                               </DataTemplate>
                           </telerik:GridViewColumn.CellTemplate>
                       </telerik:GridViewColumn>
                       <telerik:GridViewColumn Header="UWI">
                           <telerik:GridViewColumn.CellTemplate>
                               <DataTemplate>
                                   <TextBlock VerticalAlignment="Center" Margin="3,0,3,0" Text="{Binding UWI}"  />
                               </DataTemplate>
                           </telerik:GridViewColumn.CellTemplate>
                       </telerik:GridViewColumn>
                       <telerik:GridViewColumn Header="{Binding SelectedAttributes[0].Name}" IsFilterable="True">
                           <telerik:GridViewColumn.CellTemplate>
                               <DataTemplate>
                                   <TextBlock VerticalAlignment="Center" Margin="3,0,3,0" Text="{Binding FirstSelectedAttributeValue}"  />
                               </DataTemplate>
                           </telerik:GridViewColumn.CellTemplate>                            
                       </telerik:GridViewColumn>
                       <telerik:GridViewColumn Header="{Binding SelectedAttributes[1].Name}" IsFilterable="True">
                           <telerik:GridViewColumn.CellTemplate>
                               <DataTemplate>
                                   <TextBlock VerticalAlignment="Center" Margin="3,0,3,0" Text="{Binding SecondSelectedAttributeValue}"  />
                               </DataTemplate>
                           </telerik:GridViewColumn.CellTemplate>
                       </telerik:GridViewColumn>
                       <telerik:GridViewColumn Header="Preview">
                           <telerik:GridViewColumn.CellTemplate>
                               <DataTemplate>
                                   <TextBlock VerticalAlignment="Center" Margin="3,0,3,0" Text="{Binding Preview}"  />
                               </DataTemplate>
                           </telerik:GridViewColumn.CellTemplate>
                       </telerik:GridViewColumn>
                   </Merging:RadGridViewWithSelectedItemsEditable.Columns>                   
                     
               </Merging:RadGridViewWithSelectedItemsEditable>

where FirstSelectedAttributeValue and SecondSelectedAttributeValue are both string properties of my class Well, and MergeDetailsViewModel an ObservableCollection<Well>.

Here is the code of the event handler for the checkbox that applies the filter:

private void CheckBoxClicked(object sender, RoutedEventArgs e)
{
    if (ShowHideNullValuesButton.IsChecked != null && (bool)ShowHideNullValuesButton.IsChecked)
    {
        ApplyNonNullFilter(2);
        ApplyNonNullFilter(3);             
    }
    else
        SelectedUserAttributesGridView.FilterDescriptors.Clear();
}
private void ApplyNonNullFilter(int columnIndex)
{
    Telerik.Windows.Controls.GridViewColumn attributeValueColumn =
  SelectedUserAttributesGridView.Columns[columnIndex];
    IColumnFilterDescriptor attributeValueColumnFilter =
  attributeValueColumn.ColumnFilterDescriptor;
    attributeValueColumnFilter.SuspendNotifications();
    attributeValueColumnFilter.FieldFilter.Filter1.Operator = FilterOperator.IsNotEqualTo;
    attributeValueColumnFilter.FieldFilter.Filter1.Value = "NaN";
    attributeValueColumnFilter.FieldFilter.Filter1.IsCaseSensitive = true;
    attributeValueColumnFilter.ResumeNotifications();
}

What am I missing? Why filtering fails? Btw, I don't get any errors or exceptions when building and running the code. Thanks.
Dimitrina
Telerik team
 answered on 24 Oct 2014
5 answers
346 views
Hi,

I have a radmaskednumericinput which is binded two way to a property, but there is a problem, when focusing the textbox, the value from code is overided with zero.

Thanks,
Rachel.
Milena
Telerik team
 answered on 24 Oct 2014
1 answer
145 views
There is an IsDropAllowed property but no IsDragAllowed, have I missed it or an equivalent property or will I have to revert to a coding solution?

Thank you,
Martin Ivanov
Telerik team
 answered on 24 Oct 2014
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
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?