Telerik Forums
UI for WPF Forum
6 answers
98 views
The binding Microsoft ListBox or Telerik ListBox crush application because it set CurrentPosition to wrong value when collection is empty. I hope this problem will be fixed pretty soon.

This binding raise exception in ItemsControlSelector (see bug1.png)
<telerik:RadListBox x:Name="ContentItemsControl" ItemTemplate="{StaticResource GoalSimpleViewTemplate}"
                    ItemsSource="{Binding Path=ItemsSource, ElementName=MainControl }"
                    SelectedItem="{Binding Path=SelectedItem, ElementName=MainControl }">
</telerik:RadListBox>

Binding to Microsoft ListBox expose source of the problem in QueryableCollectionView (see bug2.png) 
<ListBox x:Name="ContentItemsControl" ItemTemplate="{StaticResource GoalSimpleViewTemplate}"
                            ItemsSource="{Binding Path=ItemsSource, ElementName=MainControl }"
                            SelectedItem="{Binding Path=SelectedItem, ElementName=MainControl }">
        </ListBox>

Code for model taken from Telerik WPF example
    public class MainViewModel : BaswViewModel, INavigationAware
    {
        private QueryableDataServiceCollectionView<Goal> _goals;
        private Goal _selectedGoal;
        private bool _isGoalsBusy = true;
 
        public MainViewModel(IEventAggregator eventAggregator, IRegionManager regionManager, IConnectionService connectionController, IOptionsService optionsService)
            : base(eventAggregator, regionManager, connectionController, optionsService)
        {
        }
 
        public IEnumerable<Goal> Goals
        {
            get { return IsGoalsBusy ? null : _goals; }
        }
 
        public bool IsGoalsBusy
        {
            get { return _isGoalsBusy; }
            set
            {
                if (_isGoalsBusy != value)
                {
                    _isGoalsBusy = value;
                    RaisePropertyChanged("IsGoalsBusy");
                }
            }
        }
 
        public Goal SelectedGoal
        {
            get { return _selectedGoal; }
            set
            {
                if (_selectedGoal != value)
                {
                    _selectedGoal = value;
                    RaisePropertyChanged("SelectedGoal");
                }
            }
        }
 
        public bool IsNavigationTarget(NavigationContext navigationContext)
        {
            SelectedGoal = null;
            SelectedActivity = null;
            return true;
        }
 
        public void OnNavigatedFrom(NavigationContext navigationContext)
        {
        }
 
        public void OnNavigatedTo(NavigationContext navigationContext)
        {
        }
 
        protected override void OnModelChanged()
        {
            base.OnModelChanged();
 
            if (Context != null)
            {
                UIDispatcher.BeginInvoke(() => { Initialize(); });
            }
        }
 
        private void Initialize()
        {
            _goals = new QueryableDataServiceCollectionView<Goal>(Context, Context.Goals);
            _goals.PropertyChanged += this.OnGoalsViewPropertyChanged;
            _goals.LoadedData += this.OnGoalsViewLoadedData;
            _goals.PageSize = 10;
            _goals.AutoLoad = true;
 
            RaisePropertyChanged("Goals");
        }
 
        private void OnGoalsViewPropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            if (e.PropertyName == "IsBusy")
            {
                this.IsGoalsBusy = _goals.IsBusy;
            }
        }
 
        private void OnGoalsViewLoadedData(object sender, LoadedDataEventArgs e)
        {
            if (e.HasError)
            {
                e.MarkErrorAsHandled();
            }
        }
 
    }
}



Mark
Top achievements
Rank 1
 answered on 28 Aug 2012
1 answer
112 views
Hi,
I am trying to show a date in RadDatePicker and want to make it readonly.
Able to Make the date readonly with IsReadOnly Property, but still able to click on Calendar Button and it drops which is misleading, is there any way to disable the calendar button.

Thanks
Naresh
Masha
Telerik team
 answered on 28 Aug 2012
14 answers
191 views
I inherited this code from an ex-employee and trying to fix a bug.

When entering data into a GridView and there is a nonVisible column, you can sometimes only enter in 2 rows before you can't type anything else into the cell.

I found that when a column is set to "IsVisible = false" in the "AutoGeneratingColumn" event method it behaves like this. When I comment this line out, you can enter 'n' number of rows. (of course you will see the column that is suppose to be hidden.

XAML
<Telerik:RadGridView x:Name="grdTableData"
                     Grid.Row="1"
                     TabIndex="6"
                     ShowInsertRow="True"
                     CanUserSortColumns="False"
                     ActionOnLostFocus="None"
                     ColumnWidth="*"
                     FontSize="12"
                     Margin="5"
                     SelectionMode="Single"
                     BorderThickness="1"
                     IsFilteringAllowed="False"
                     ShowGroupPanel="False"
                     BorderBrush="Black"
                     AutoGenerateColumns="True"
                     AlternationCount="2"
                     RowEditEnded="grdTableData_RowEditEnded"
                     AutoGeneratingColumn="grdTableData_AutoGeneratingColumn">
</Telerik:RadGridView>


C#
public partial class MainWindow : Window
{
    DataTable dt = new DataTable();
    DataTable emptyDT = new DataTable();
    public MainWindow()
    {
        InitializeComponent();
          
        emptyDT.Columns.Add("Hidden");
        emptyDT.Columns.Add("Lookup");
        grdTableData.ItemsSource = emptyDT.DefaultView;
        dt.Columns.Add("Hidden");
        dt.Columns.Add("Lookup");
        grdTableData.ItemsSource = dt.DefaultView;
    }
    private void grdTableData_RowEditEnded(object sender, Telerik.Windows.Controls.GridViewRowEditEndedEventArgs e)
    {
        ReadDataPage();
    }
    private void ReadDataPage()
    {
        // clear grid
        grdTableData.ItemsSource = emptyDT.DefaultView;
        // repopulate grid
        grdTableData.ItemsSource = dt.DefaultView;
    }
    private void grdTableData_AutoGeneratingColumn(object sender, Telerik.Windows.Controls.GridViewAutoGeneratingColumnEventArgs e)
    {
        if( e.Column.Header.ToString() == "Hidden" )
            e.Column.IsVisible = false;         // <---- COMMENT THIS and it works.
    }
}

Vlad
Telerik team
 answered on 28 Aug 2012
0 answers
117 views
I wander whether i can show reflection on the bottom of carousel control.
Anyone can help me?
zhanchang jiang
Top achievements
Rank 1
 asked on 28 Aug 2012
0 answers
111 views

Hi,

Changing Themes is one of the requirement in our project.

Reviewing the below link for the changing the Themes at runtime, but do not find the any Theme files in the installation folder (Binaries.NoXaml) as explained in the step 1.

Could you kindly point to where these files are available or provide with the required files. We are using the Telerik Q1 2012 controls.

We have plans to upgrade to the future Releases as they are available.

 

Kindly suggest.



Thank you & Regards,

Phani.

Phani Kumar
Top achievements
Rank 1
 asked on 27 Aug 2012
1 answer
141 views
Hello!
Is any posibility to loady just one, selected control persisted to isolated storage by method:
private readonly PersistenceManager _persistanceManager;
 
private readonly IsolatedStorageProvider _isoStorageProvider;
 
...
 
_alertsDataService = alertsDataService;
 
_persistanceManager = new PersistenceManager();
 
_isoStorageProvider = new IsolatedStorageProvider(_persistanceManager);
 
...
 
_isoStorageProvider.SaveToStorage();


I'm using that method:

_isoStorageProvider.LoadFromStorage();


but all controls with telerik:PersistanceManager.StorageId property are loaded then (I want just one of them).

What should I do?
Zarko
Telerik team
 answered on 27 Aug 2012
3 answers
310 views
My application freezes when I try to expand a node on RadTreeView that has over 1000 children. Is there anyway to avoid this? I tried using on-demand loading and it doesn't seem to do anything. So it makes me believe that it's the rendering part of the treeview that is clogging the CPU.

Thanks,
Jin
Tina Stancheva
Telerik team
 answered on 27 Aug 2012
4 answers
211 views
I am really unhappy with the way RADRibbonView displays the header of a button and of a group. It the text is a little bit too long and wraps the second live overwrites the first line which looks bad (I ran into a similar issue with the Microsoft Ribbon and that was the main reason I choose Telerik). It looks good in design mode but goes wrong when I run the app.

Is there any way to prevent the RADRibbonButton from shrinking at runtime? Do I have to define a template?

Regards,
Peter

PS: I attached a screenshot of the Ribbon that shows what went wrong.
Tina Stancheva
Telerik team
 answered on 27 Aug 2012
9 answers
374 views
Hello!

We are developing an application using Telerik Controls. When we stand in front of use Presitence Framework, we found that this is not saving groups in RadGridViews

We are using MVVM Light, all RadGridViews ItemSource are bound to ViewModels, all columns are autogenerated.

Saving grouping state is very important in our project - what could we have done wrong?
Tina Stancheva
Telerik team
 answered on 27 Aug 2012
0 answers
93 views
Hi,

I need to disable editing of cells but be able to insert row. With my current property settings:

CanUserInsertRows="True" 
IsReadOnly="False" 

It is not possible to insert row while the grid is readonly.

What is the best way of achieving what I want?
Mark
Top achievements
Rank 1
 asked on 27 Aug 2012
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
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?