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

Sliverlight 5: CellDoubleClickEvent

2 Answers 57 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Andy
Top achievements
Rank 1
Andy asked on 16 Jan 2012, 06:23 PM
Hi,

I am trying to capture the double click event when a user clicks on any cell in my RadDataGrid. I have done this successfully with SL4 in the past. When running in a SL5 project against the RadControls_for_Silverlight5_2011_3_1220_DEV_hotfix DLLs the handler does not get invoked. There are no errors displayed to me and the RadGridView displays the dummy data as expected. 

I don't think I can attach the project so I have included the class file below. I don't think it can be any simpler.

using System;
using System.Collections.ObjectModel;
using System.Windows;
using System.Windows.Controls;
using Telerik.Windows;
using Telerik.Windows.Controls.GridView;
  
namespace test3
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();
  
            // Add the dummy data to the rad grid
            ObservableCollection<EfsDocument> efsDocumentsColl = new EfsDocumentDummyData().efsDocumentsColl;
            RadGrid.ItemsSource = efsDocumentsColl;
            RadGrid.Rebind();
        }
  
        private void RadGrid_Loaded(object sender, RoutedEventArgs e)
        {
            // Subscribe to the Cell double click event
            this.RadGrid.AddHandler(GridViewCellBase.CellDoubleClickEvent, new EventHandler<Telerik.Windows.RadRoutedEventArgs>(GridCellLeftDoubleClickEvent), true);
        }
  
        private void GridCellLeftDoubleClickEvent(object sender, RadRoutedEventArgs args)
        {
            // This code is never reached
            System.Windows.MessageBox.Show("GridCellLeftDoubleClickEvent has been fired");
        }
    }
  
  
    public class EfsDocumentDummyData
    {
        internal ObservableCollection<EfsDocument> efsDocumentsColl = new ObservableCollection<EfsDocument>();
  
        public EfsDocumentDummyData()
        {
            // Create some dummy data
            efsDocumentsColl.Add(new EfsDocument() { CaseID = "6794903", DocID = 10121165, EditDate = new DateTime(2011, 01, 01), Name = "name test1", NextAction = "next Action", NextActionFE = "Next Ac FE", Status = "Status1", Type = "type" });
            efsDocumentsColl.Add(new EfsDocument() { CaseID = "6794904", DocID = 10121165, EditDate = new DateTime(2011, 01, 01), Name = "name test2", NextAction = "next Action", NextActionFE = "Next Ac FE", Status = "Status1", Type = "type" });
            efsDocumentsColl.Add(new EfsDocument() { CaseID = "6794905", DocID = 10121165, EditDate = new DateTime(2011, 01, 01), Name = "name test3", NextAction = "next Action", NextActionFE = "Next Ac FE", Status = "Status1", Type = "type" });
            efsDocumentsColl.Add(new EfsDocument() { CaseID = "6794906", DocID = 10121165, EditDate = new DateTime(2011, 01, 01), Name = "name test4", NextAction = "next Action", NextActionFE = "Next Ac FE", Status = "Status2", Type = "type" });
            efsDocumentsColl.Add(new EfsDocument() { CaseID = "6794907", DocID = 10121165, EditDate = new DateTime(2011, 01, 01), Name = "name test5", NextAction = "next Action", NextActionFE = "Next Ac FE", Status = "Status2", Type = "type" });
        }
    }
  
  
    public class EfsDocument
    {
        public string CaseID { get; set; }
        public int DocID { get; set; }
        public string Type { get; set; }
        public string Name { get; set; }
        public string Status { get; set; }
        public DateTime EditDate { get; set; }
        public string NextAction { get; set; }
        public string NextActionFE { get; set; }
  
        public EfsDocument()
        {
  
        }
    }
}
 

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimitrina
Telerik team
answered on 17 Jan 2012, 08:50 AM
Hi,

Indeed, there was such an issue, but we have fixed it. The fix is included in the latest internal build that is available for download under your accoun.

Please try it and let me know if the issue is still there.


Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Andy
Top achievements
Rank 1
answered on 17 Jan 2012, 10:39 AM
Thank you this worked. I think this build was only released yesterday hence the reason I did not try them before. Just for anyone else
reading I found that I had to delete the bin directory and then add the references to the new DLLs in order for the new DLLs to get picked up. Also this issue is not mentioned in the release notes.

Thanks for your assistance

Andy

Tags
GridView
Asked by
Andy
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Andy
Top achievements
Rank 1
Share this question
or