Telerik Forums
UI for WPF Forum
21 answers
323 views
Floating panes doe not move smoothly when I move them around with the mouse. They jerk about 1cm at a time.
The complete WPF Window moves smoothly.

This problem only occurs on my desktop PC not on my far less powerful notebook.


Using: WPF40_2010_2_0812
Gregory
Top achievements
Rank 1
 answered on 26 May 2011
1 answer
382 views
I'm using the RadGridView in an MVVM application. The SortingState of each column is bound to a property (one per column) in my ViewModel. When I set a new value to these properties in code I expect the sorting of the corresponding column to be updated. However, that doesn't work as expected. The column header indicates that the column is ordered as I specified, but the rows are not ordered. Also, if I update the data in the GridView the sorting I set through code completely disappears.

I've found one perticular interesting scenario:
1. I start the application and load some data into the GridView.
2. I sort the data by column A by clicking the header of this column (works fine).
3. I press a button that invokes a command in the ViewModel that sets the SortingState of column A to SortingState.None (removes the sorting that is) and sets the SortingState of column B to SortingState.Ascending
4. The GridView header now indicates that the data should be sorted ascending by column B and not sorted by any other column. However, the rows are still sorted as before (by column A).
5. Now I fetch some new data (completely replace the old data).
6. The GridView now reverts into my previous sorting order, that is to sort by column A. This is both indicated by the GridView header and by the way the rows are actually sorted.

What am I doing wrong?

Here's how my XAML looks:
<tgv:RadGridView ItemsSource="{Binding Path=DataRows, Mode=OneWay}" AutoGenerateColumns="False" Grid.Row="0">
    <tgv:RadGridView.Columns>
        <tgv:GridViewDataColumn Header=Column A"
            DataMemberBinding="{Binding Path=Id}"
            SortingState="{Binding Path=SortingStateColumnA, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
        <tgv:GridViewDataColumn Header="Column B"
            DataMemberBinding="{Binding Path=FirstName}"
            SortingState="{Binding Path=SortingStateColumnB, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
    </tgv:RadGridView.Columns>
</tgv:RadGridView>
<Button Grid.Row="1" Command="{Binding Path=ApplySortOrderCommand, Mode=OneTime" />

And the ViewModel:
public class MainWindowViewModel : ViewModelBase
{
    private RadObservableCollection<DataRowViewModel> _dataRows;
    private RelayCommand _applySortOrderCommand;
    private SortingState _sortingStateColumnA = SortingState.None;
    private SortingState _sortingStateColumnB = SortingState.None;
 
    public MainWindowViewModel()
    {
        _dataRows = new RadObservableCollection<DataRowViewModel>();
    }
 
    public RadObservableCollection<DataRowViewModel> DataRows
    {
        get
        {
            return _dataRows;
        }
    }
     
    public SortingState SortingStateColumnA
    {
        get
        {
            return _sortingStateColumnA;
        }
        set
        {
            if (value != _sortingStateColumnA)
            {
                _sortingStateColumnA = value;
                OnPropertyChanged("SortingStateColumnA");
            }
        }
    }
     
    public SortingState SortingStateColumnB
    {
        get
        {
            return _sortingStateColumnB;
        }
        set
        {
            if (value != _sortingStateColumnB)
            {
                _sortingStateColumnB = value;
                OnPropertyChanged("SortingStateColumnB");
            }
        }
    }
 
    public ICommand ApplySortOrderCommand
    {
        get
        {
            if (_applySortOrderCommand == null)
            {
                _applySortOrderCommand = new RelayCommand(param => ApplySortOrder());
            }
            return _applySortOrderCommand;
        }
    }
 
    private void ApplySortOrder()
    {
        SortingStateColumnB = SortingState.Ascending;
    }
}

Code to fetch data removed for brevity. Note that this is not my actual code so please disregard typos.
Vlad
Telerik team
 answered on 26 May 2011
1 answer
118 views
Hi,

in my gridview, I have a column base on a bool value and for each rows, for this column, a checkbox is visible. I would like to know if it's possible to center horizontally those checkboxes?

Thank's
Vanya Pavlova
Telerik team
 answered on 26 May 2011
3 answers
270 views
Hi,

im using a TreeListView and would like to get an event, when the selection in a ComboboxColumn changes. I can't find any event helping me. Here is my XAML:

		<telerik:RadTreeListView Name="rtlvQuery" Grid.Column="0" Grid.Row="0" IsDragDropEnabled="true" Margin="30" AutoGenerateColumns="False" >
			<telerik:RadTreeListView.ChildTableDefinitions>
				<telerik:TreeListViewTableDefinition ItemsSource="{Binding Filters}" />
			</telerik:RadTreeListView.ChildTableDefinitions>
			<telerik:RadTreeListView.Columns>
				<telerik:GridViewDataColumn DataMemberBinding="{Binding IsActive}" Header="Active" />
				<telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" Header="Name" />
				<telerik:GridViewDataColumn DataMemberBinding="{Binding Description}" Header="Description"/>
				<telerik:GridViewComboBoxColumn ItemsSourceBinding="{Binding AvailableFilterTypes}" DataMemberBinding="{Binding FilterType}"  
												Header="Type" SelectedValueMemberPath="Value"  DisplayMemberPath="DisplayName" />
				<telerik:GridViewDataColumn DataMemberBinding="{Binding IsNegated}" Header="Negate"/>
 
			</telerik:RadTreeListView.Columns>
		</telerik:RadTreeListView>

I use a ItemSourceBinding because the available Combobox is bound to a filtered List of EnumMemberViewModel build by EnumDataSource.FromType<FilterType>( );

I tried the following, that I found in the forum for RadGridView, but thta doesn't seem to work in TLV:

		<Grid.Resources>
			<Style TargetType="telerik:RadComboBox" >
				<EventSetter Event="SelectionChanged" Handler="ComboBox_SelectionChanged" />
			</Style>
		</Grid.Resources>

Any idea, how I could solve this?

Thanks
Hans




Pavel Pavlov
Telerik team
 answered on 26 May 2011
1 answer
139 views
Hi,

i am trying to change the selection of a RadComboBox with seperate Buttons.
One to select the previous entry in the RadComboBox and one to select the next.
Is there a way to do that with build-in commands?
Or is there another possibility to do that without Code-Behind?
Valeri Hristov
Telerik team
 answered on 26 May 2011
5 answers
206 views
Greetings,

I'm using the RadGridView inside of a Windows Forms ElementHost and have lost the ability to drag the column headers. I'm using Q1 2010 release. It worked great for us in Q3 2009 SP2. Any Suggestions for a work around would be great.

Thanks much
~Boots
Ariel
Top achievements
Rank 1
 answered on 26 May 2011
12 answers
309 views
Hello,

I'm not sure if this is working as designed or a bug, but here is the issue.

We have a GridView hosted in a RadPane.  If the Pane is pinned, grouping works great.  If the pane is unpined, you can hover over it to expand the pane, but none of the grouping features work until you pin the pane again.

On a secondary note, I also noticed the sorting also get's lost when the pane is pinned and unpinned.

We are using the latest release 2010.2 812 of the controls.

Here is a quick sample on how we are using it:
<telerik:RadDocking>
    <telerik:RadDocking.DocumentHost>
        <telerik:RadSplitContainer>
            <telerik:RadPaneGroup />
        </telerik:RadSplitContainer>
    </telerik:RadDocking.DocumentHost>
    <telerik:RadSplitContainer InitialPosition="DockedLeft">
        <telerik:RadPaneGroup>
            <telerik:RadPane Title="Pane 1" CanUserClose="False" CanFloat="False" CanDockInDocumentHost="False">
                <telerik:RadGridView x:Name="radGridView" AutoGenerateColumns="False">
                    <telerik:RadGridView.Columns>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding LastName}" Header="Last Name"/>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Married}" Header="Is Married"/>
                    </telerik:RadGridView.Columns>
                </telerik:RadGridView>
            </telerik:RadPane>
        </telerik:RadPaneGroup>
    </telerik:RadSplitContainer>
</telerik:RadDocking>
Tsvyatko
Telerik team
 answered on 26 May 2011
1 answer
142 views
Hi,

I have a copy menu with command = Copy and CommandTarget=MyRadGridView. Now when i click copy and paste it in excel, it pastes the name of the binding object for the columns where I'm using converter to concatenate two fields. For columns which have direct binding defined it copies the data.

Copy command:

 

 

 

<MenuItem Header="Copy" InputGestureText="Ctrl+C" Command="ApplicationCommands.Copy" CommandTarget="{Binding ElementName=vpRadGridView}"/>

GridColumns
1.

 

 

 

 

 

<telerik:GridViewDataColumn

 

 

 

 

 

 

 

 

 

 

 

Header="Verification Path Pair"

 

 

 

 

 

 

 

 

 

 

 

UniqueName="VerificationPathPair"

 

 

 

 

 

 

 

 

 

 

 

DataMemberBinding="{Binding Path=., Converter={StaticResource VPPair}}"

 

 

 

 

 

 

 

 

 

 

 

/>

 

2.

<

 

 

telerik:GridViewDataColumn

 

 

 

Header="Verification Path ID"

 

 

 

UniqueName="VerificationPathID"

 

 

 

DataMemberBinding="{Binding Name, ValidatesOnExceptions=True, Mode=OneWay, ValidatesOnDataErrors=True}"

 

 

 

/>

 

Copy Results:

MySolution.OrmNhib.BusinessObjects.OnepValidochpath

   VP1
It should have copied actual data for column 1 also as it did for column 2. Any suggestion?

Ivan Ivanov
Telerik team
 answered on 26 May 2011
1 answer
81 views
I get the following error in my code after upgrading the controls. The problem is, even the demo of group header still uses the OrientedGroupHeaderContentTemplateSelector object. What gives?


Error 10 'Telerik.Windows.Controls.OrientedGroupHeaderContentTemplateSelector' is obsolete: 'Please, use the StringFormat properties, the System.Windows.Controls.GroupHeaderTemplateSelector or inherit from System.Windows.Controls.ScheduleViewDataTemplateSelector instead.' C:\Users\rodneyy\Documents\MetrixDevelopment\MetrixDevelopment\Client\Metrix.UI\Managers\RepairCenterComponent\RepairBoardManager.cs 62 148 Metrix.UI

This is the line that produces the error...
repairBoardScheduleView.GroupHeaderContentTemplateSelector = Application.Current.FindResource("GroupHeaderContentTemplateSelector") as OrientedGroupHeaderContentTemplateSelector;

So apparently this works but I don't understand why I am casting this resource to something that it is not....
repairBoardScheduleView.GroupHeaderContentTemplateSelector = Application.Current.FindResource("GroupHeaderContentTemplateSelector") as ScheduleViewDataTemplateSelector;
Yana
Telerik team
 answered on 26 May 2011
3 answers
132 views
Hello there,

I have an issue with SelectedItemRemoveBehaviour of RadPaneGroup - it is either not working as expected or I don't understand what is expected. I am using it to control which document is selected when the current one has been closed. It doesn't matter which value I use, everytime the first item (left to right) is selected.

Can you help me understand this property, please? Is there a bug, or I am missing something. Let me know if you need me to provide you with a basic project with this issue reproduced.

As a side note - I am adding dynamically items to RadPaneGroup of type RadDocumentPane. I would like when a user closes the current document, then the previous used one is selected. I know how to achieve this programatically, but I found this property and I thought I can use it.

Thanks for your assistance.

Best Regards,

Ivan.
Miroslav Nedyalkov
Telerik team
 answered on 26 May 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
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
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?