This is a migrated thread and some comments may be shown as answers.

CanUserSelect bug

9 Answers 85 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Tomas
Top achievements
Rank 1
Tomas asked on 24 Jun 2010, 08:20 AM
I think I've found a bug in the GridView control when the property CanUserSelect is set to False I'm still able to select all rows by using the select all shortcut key (ctrl + a).

Btw the PITS crashes after login when clicking the Silverlight section....

9 Answers, 1 is accepted

Sort by
0
Accepted
Milan
Telerik team
answered on 24 Jun 2010, 04:07 PM
Hello Tomas,

Thank you for your feedback. I confirm this bug and we will try to fix it for tomorrow's Internal Build. 

I have updated your Telerik points.


Regards,
Milan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Milan
Telerik team
answered on 29 Jun 2010, 04:05 PM

Hi Tomas,

The bug is already fixed and it will be included in this Friday's internal build.


Best wishes,
Milan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Sam
Top achievements
Rank 1
answered on 08 Jul 2010, 10:57 AM
has this been included into internal build 2010.1.702.1040?  I have already upgraded to this internal build and the same thing still happens.

because i still have the same problem, or maybe i am doing something wrong?

basically i am trying to get drag and drop on gridviewrow in the radgridview.  this used to work before i upgraded to 2010 Q1.

any help would be great.  I've included the control that i have made for this.  it seems the SetIsSelected is fired regardless which means RaiseSelectionChangedEvent is also fired, i am sure before that wasn't the case when i set CanUserSelect.

using System.Collections;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Input;
using Telerik.Windows.Controls;
using Telerik.Windows.Controls.DragDrop;
using Telerik.Windows.Controls.GridView;
 
namespace Controls {
    public class RadGridViewEx : RadGridView {
 
        public static readonly DependencyProperty IsDragAllowedProperty = DependencyProperty.Register("IsDragAllowed", typeof(bool), typeof(RadGridViewEx), new PropertyMetadata(null));
        public static readonly DependencyProperty IsSelectionAllowedProperty = DependencyProperty.Register("IsSelectionAllowed", typeof(object), typeof(RadGridViewEx), new PropertyMetadata(null));
        public static readonly DependencyProperty DragPayloadProperty = DependencyProperty.Register("DragPayload", typeof(object), typeof(RadGridViewEx), new PropertyMetadata(null));
 
        public RadGridViewEx()
            : base() {
            this.RowLoaded += new System.EventHandler<RowLoadedEventArgs>(RadGridViewEx_RowLoaded);
            CanUserSelect = false;
            IsSelectionAllowed = true;
        }
 
        public bool IsDragAllowed {
            get { return (bool)GetValue(IsDragAllowedProperty); }
            set { SetValue(IsDragAllowedProperty, value); }
        }
        public bool IsSelectionAllowed {
            get { return (bool)GetValue(IsSelectionAllowedProperty); }
            set { SetValue(IsSelectionAllowedProperty, value); }
        }
        public object DragPayload {
            get { return GetValue(DragPayloadProperty); }
            set { SetValue(DragPayloadProperty, value); }
        }
 
 
        void RadGridViewEx_RowLoaded( object sender, RowLoadedEventArgs e ) {
            GridViewRow row = e.Row as GridViewRow;
            if (row != null) {
                row.AddHandler(GridViewRow.MouseLeftButtonDownEvent, new MouseButtonEventHandler(row_MouseLeftButtonDown), true);
                row.AddHandler(GridViewRow.MouseLeftButtonUpEvent, new MouseButtonEventHandler(row_MouseLeftButtonUp), true);
                if (IsDragAllowed) {
                    RadDragAndDropManager.SetAllowDrag(row, true);
                }
            }
        }
 
        void row_MouseLeftButtonUp( object sender, MouseButtonEventArgs e ) {
            if (sender is GridViewRow) {
                if (sender == null) {
                    return;
                }
                GridViewRow row = sender as GridViewRow;
                if (IsSelectionAllowed) {
                    SelectedItem = row.DataContext;
                }
            }
        }
 
        void row_MouseLeftButtonDown( object sender, MouseButtonEventArgs e ) {
            if (sender is GridViewRow) {
                if (sender == null) {
                    return;
                }
                GridViewRow row = sender as GridViewRow;
                IList a = new List<object>();
                a.Add(row.DataContext);
 
                DragPayload = a;
            }
        }
    }
}
0
Milan
Telerik team
answered on 13 Jul 2010, 09:37 AM
Hello Sam,

I confirm that the SelectAll (CTRL+A) bug is fixed in 702. I am sending you a  sample application that demonstrates this.

Maybe the assembly references are not updated? Sometimes, if the old assemblies are still contained in the project folder the project might choose to use the old assemblies instead of the new ones.


Greetings,
Milan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Sam
Top achievements
Rank 1
answered on 15 Jul 2010, 01:06 PM
just upgraded to 2010.2.714.1040 and it is now fixed

thanks
0
hemant
Top achievements
Rank 1
answered on 19 Jul 2010, 08:32 AM
What about for SL 3 Version ?
I upgradted to newer version but it generates othe issues.
also my ToHtml() function stops working giving nullrefrence Exception.
0
Milan
Telerik team
answered on 19 Jul 2010, 08:53 AM
Hi hemant,

Could you please open a separate thread for the null reference exception. 


Best wishes,
Milan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Milan
Telerik team
answered on 19 Jul 2010, 08:53 AM
Hi hemant,

Could you please open a separate thread for the null reference exception. 


Best wishes,
Milan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Milan
Telerik team
answered on 19 Jul 2010, 08:53 AM
Hi hemant,

Could you please open a separate thread for the null reference exception. 


Best wishes,
Milan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Tomas
Top achievements
Rank 1
Answers by
Milan
Telerik team
Sam
Top achievements
Rank 1
hemant
Top achievements
Rank 1
Share this question
or