This question is locked. New answers and comments are not allowed.
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.
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()
{
}
}
}