Telerik Forums
UI for WPF Forum
1 answer
80 views
Hello Everyone,

What I am looking for is a way to have the legend sidebar have scrolling. Is this possible with the RadChart?

Thanks,
Chris
Evgenia
Telerik team
 answered on 30 Sep 2011
2 answers
131 views
Hi, I need to set my own text to the current cell.  I tried with this instruction:

RadGridView1.CurrentCell.Value = "sometext";

But the cell remains empty.  Thanks in advance
Maya
Telerik team
 answered on 30 Sep 2011
2 answers
129 views
Hi,

I have several controls in my app that uses grid. Grid is being used on all of them in the same way:
        <telerik:RadGridView x:Name="RadGridView1" ItemsSource="{Binding Items}" Margin="0"
                             RowIndicatorVisibility="Collapsed" IsReadOnly="True"                           
                             AutoGenerateColumns="False" CanUserFreezeColumns="False"
                             CanUserResizeColumns="True" MouseDoubleClick="RadGridView1_MouseDoubleClick" IsFilteringAllowed="True">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding BusinessItem.Name}" Width="*" />
...

however on some of those grids filtering and sorting is working properly, on some grids it is working only on bool columns and on some it is not working at all (I cannot see the 'tube' symbol for filtering and I cannot sort the column by clicking its header).

What may be wrong?
Rossen Hristov
Telerik team
 answered on 30 Sep 2011
3 answers
167 views
When binding a gridview to a datatable.defaultview and autogenerating columns, what is the best way to assign data formats to columns? In particular datetime columns to short format? All I can find in documentation is to use XAML DataFormatString of column, but I don't see the C# option to set this in the column objects.
Vlad
Telerik team
 answered on 30 Sep 2011
4 answers
108 views

Hi there,

I am currently evaluating your RadGridView and I must say that I'm quite surprised. Your RadGridView control is easy and straight forward to use compare to other bigger brands in the market. It's very unfortunate that I had wasted several weeks evaluating other grid controls.

I'm currently having a problem with MultipleSelect when it's set to True. Please have a look at the following sample,

XAML code:

<Window x:Class="WpfApplication1.Window1" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Title="Window1" Height="412" Width="447" 
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 
        xmlns:WpfApplication1="clr-namespace:WpfApplication1">  
    <Window.Resources> 
        <ObjectDataProvider x:Key="viewModel" ObjectType="{x:Type WpfApplication1:CustomerViewModel}" /> 
    </Window.Resources> 
    <Grid> 
        <telerik:RadGridView Name="uxdGrid" AutoGenerateColumns="False" 
                             ItemsSource="{Binding Source={StaticResource viewModel}, Path=CustomersList}">  
            <telerik:RadGridView.Columns> 
                <telerik:GridViewDataColumn Width="100" IsReadOnly="False" DataType="{x:Null}" HeaderText="Customer Id" UniqueName="CustomerId" /> 
            </telerik:RadGridView.Columns> 
        </telerik:RadGridView> 
    </Grid> 
</Window> 
 

Code behind:

using System.Collections.Generic;  
using System.ComponentModel;  
using System.Windows;  
using System.Windows.Data;  
 
namespace WpfApplication1  
{  
    /// <summary>  
    /// Interaction logic for Window1.xaml  
    /// </summary>  
    public partial class Window1 : Window  
    {  
        public Window1()  
        {  
            InitializeComponent();  
        }  
    }  
 
    public class CustomerViewModel  
    {  
        public CustomerViewModel()  
        {  
            List<Customer> customers = new List<Customer>();  
 
            for (int i = 0; i < 10; i++)  
            {  
                Customer customer = new Customer();  
                customer.CustomerId = i;  
                customer.CustomerName = string.Format("Name {0}", i);  
                customers.Add(customer);  
            }  
 
            _view = new ListCollectionView(customers);  
        }  
 
        private readonly ListCollectionView _view;  
 
        public ListCollectionView CustomersList  
        {  
            get 
            {  
                return _view;  
            }  
        }  
    }  
 
    public class Customer : INotifyPropertyChanged  
    {  
        private int _customerId;  
        private string _customerName = string.Empty;  
 
        public int CustomerId  
        {  
            get 
            {  
                return _customerId;  
            }  
            set 
            {  
                _customerId = value;  
                SendPropertyChanged("CustomerId");  
            }  
        }  
 
        public string CustomerName  
        {  
            get 
            {  
                return _customerName;  
            }  
            set 
            {  
                _customerName = value;  
                SendPropertyChanged("CustomerName");  
            }  
        }  
 
        private event PropertyChangedEventHandler _propertyChanged;  
 
        public event PropertyChangedEventHandler PropertyChanged  
        {  
            add  
            {  
                _propertyChanged += value;  
            }  
            remove  
            {  
                _propertyChanged -= value;  
            }  
        }  
 
        /// <summary>  
        /// Raises the property changed event.  
        /// </summary>  
        /// <param name="propertyName">The property name which value has been changed</param>  
        protected void SendPropertyChanged(string propertyName)  
        {  
            if (_propertyChanged != null)  
            {  
                _propertyChanged(thisnew PropertyChangedEventArgs(propertyName));  
            }  
        }  
    }  
}  
 

It works as it's expected. But if you set the property MultipleSelect="True",

    <Grid>    
        <telerik:RadGridView Name="uxdGrid" AutoGenerateColumns="False" MultipleSelect="True"   
                             ItemsSource="{Binding Source={StaticResource viewModel}, Path=CustomersList}">     
            <telerik:RadGridView.Columns>    
                <telerik:GridViewDataColumn Width="100" IsReadOnly="False" DataType="{x:Null}" HeaderText="Customer Id" UniqueName="CustomerId" />    
            </telerik:RadGridView.Columns>    
        </telerik:RadGridView>    
    </Grid>    
 

You will notice that the grid is showing the correct number of rows but unfortunately it's not showing any data. Is there anything that I miss here?

Regards,

Hardi
Vlad
Telerik team
 answered on 30 Sep 2011
2 answers
230 views
Hi,

I have this situation where my business object exposes a DateTime property
and I'm binding a GridViewDataColumn to that property using a custom IValueConverter
which "simplify" the date. It converts the datetime to a string, something like "today, 10:15" or
"September 1st, 9:45" (without the current year). The point is that the target value is now a string.

Then I set up a GroupMemberPath to point at "MyProperty.Date" in order to group by day.

I just realized that group headers get populated by accessing that special path and pushing the value
through whatever IValueConverter is specified in the DataMemberBinding.

The only problem is that I cannot set a different ConverterParameter, so the time portion
(which is included in the "simplified" output) gets printed as well (00:00 in all groups).

The point is: wouldn't it be better to have a "GroupMemberBinding" instead of "GroupMemberPath"?
So that if a different conversion is needed for the grouped data to make sense we can specifiy
a different converter and/or converterParameter?

Am I splitting a hair?  :-)

Thanks.

-Rodrigo-
Rodro
Top achievements
Rank 2
 answered on 30 Sep 2011
7 answers
827 views
I am using a RadGridView to display information about people.
The last column is for edit/delete buttons.
Whenever I set the last column's width to "*" (to fill the rest of the space), a horizontal scroll bar appears.
If I have 1 column in my grid, then the last column's width properly fills the remaining space and no horizontal scroll bar appears; however, the more columns that I add to the grid, the more you have to scroll to see the edit buttons (the worse the horizontal scroll bar becomes).

This is the markup for my GridView:

<telerik:RadGridView Name="PeopleGrid"
                     Width="{Binding ElementName=theRootElement, Path=ActualWidth}"
                     ItemsSource="{Binding Source={StaticResource people}, Path=People}"
                     IsReadOnly="True"
                     EditTriggers="None">
    <telerik:RadGridView.Columns>
        <telerik:GridViewToggleRowDetailsColumn ExpandMode="Single" />
        <telerik:GridViewDataColumn Header="First Name" DataMemberBinding="{Binding FirstName}" />
        <telerik:GridViewDataColumn Header="Last Name" DataMemberBinding="{Binding LastName}" />
        <telerik:GridViewDataColumn Header="Age" DataMemberBinding="{Binding Age}" />
        <telerik:GridViewDataColumn Header="Marital Status" DataMemberBinding="{Binding MaritalStatus}" />
        <telerik:GridViewDataColumn Width="*">
            <telerik:GridViewDataColumn.CellStyle>
                <Style TargetType="telerik:GridViewCell">
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                                    <Button x:Name="btn_EditPerson" ToolTip="Edit">
                                         Edit
                                    </Button>
                                    <Button ToolTip="Delete"
                                            Command="{Binding Source={StaticResource people}, Path=DeletePerson}"
                                            CommandParameter="{Binding .}">
                                              Delete
                                    </Button>
                                </StackPanel>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </telerik:GridViewDataColumn.CellStyle>
        </telerik:GridViewDataColumn>
    </telerik:RadGridView.Columns>
    <telerik:RadGridView.RowDetailsTemplate>
        <DataTemplate>
            <!-- Additional Controls to Display Additional Info...has no affect on problem if I comment this part out -->
        </DataTemplate>
    </telerik:RadGridView.RowDetailsTemplate>
</telerik:RadGridView>


Thanks, in advanced, for your help!




newbie
Top achievements
Rank 1
 answered on 29 Sep 2011
13 answers
283 views
I am using the ScheduleView to allow the user to add and edit custom appointments.
These appointments are always recurring weekly.

Since the appointments are always recurring, I would like to always edit the series.
I'm not sure how to prevent the window that prompts the user to select whether edit the series or the individual appointment from opening...

I am looking for a way to always edit the series.

Thanks!
newbie
Top achievements
Rank 1
 answered on 29 Sep 2011
2 answers
185 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
256 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
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
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?