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

[Solved] CellDouble Click event Fires multiple time for GridView

7 Answers 143 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.
Parthiv
Top achievements
Rank 1
Parthiv asked on 24 Sep 2010, 06:49 AM

In my application I want to see multiple record in radwindow as well as that can be edited.In my RadGrid as I double click on any selected record it opens Radwindow and bind my record to my edit control in radwindow.
I need to create multiple radwindow because I need to allow user to compare one record with existing one on time of edit.

Below is sample my code snippet.

public Formlist()

{

this.FormsGrid.AddHandler(GridViewCellBase.CellDoubleClickEvent, new EventHandler<RadRoutedEventArgs>(OnCellDoubleClick), true);

 

}

 

private void OnCellDoubleClick(object sender, RadRoutedEventArgs args)

 {

    if (FormsGrid.SelectedItem != null)

    {

                    Dictionary<string, string> dict = (Dictionary<string, string>)FormsGrid.SelectedItem;

 

                    erp3sService.SelectAllEntityRecordAsync(EntityID, FormID, "select * from " + EntityName + " where ID= " + dict["ID"]);

                    erp3sService.SelectAllEntityRecordCompleted += new EventHandler<Erp3s.Erp3sService.SelectAllEntityRecordCompletedEventArgs>(erp3sService_SelectAllEntityRecordCompleted);

 

 

    }

           

}

 

private void erp3sService_SelectAllEntityRecordCompleted(object sender, Erp3sService.SelectAllEntityRecordCompletedEventArgs e)

{

if (e.Result != string.Empty)

                {

//dict= comes from e.result

  bool useCanvasPainting = true;

            test tc = null;

            RadWindow rd = new RadWindow();

            rd.Header = "3sERP";

            rd.Icon = (object)(new RadWindowHeaderImage());

            rd.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen;

            rd.WindowStateChanged += new RoutedEventHandler(NewFormWindow_WindowStateChanged);

            rd.Closed += new EventHandler<WindowClosedEventArgs>(NewFormWindow_Closed);

 

            StyleManager.SetTheme(rd, new Office_BlueTheme());

 

            ScrollViewer scrInner = new ScrollViewer();

            scrInner.MinWidth = 20;

            scrInner.MinHeight = 20;

            scrInner.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;

            scrInner.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;

            scrInner.Content = null;

            rd.Content = null;

            rd.ResizeMode = ResizeMode.CanResize;

            if (NewRecord == true)

            {

                tc = new test(FormID, EntityID, EntityName, DisplayEntityName);

                scrInner.Content = tc;             

             

            }

            else

            {

                tc = new test(FormID, EntityID, EntityName, DisplayEntityName, dict);

                scrInner.Content = tc;

            }

 

            rd.Content = scrInner;           

            rd.Show();

 

}

}

 here i m facing proble when i double click on selected record. when i click first time it execute cellDoubleclick once .and i select another record and hit double click it executes cellDoubleclick events twise, next time it will thrise and so on....

 

 

 


7 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 24 Sep 2010, 01:14 PM
Hi Parthiv,

I would need more information about the exact way you handle the GridViewCellDoubleClick event and the developed OnCellDoubleClick method. What is the exact scenario you want to accomplish? A relevant code-snippet demonstrating your implementation would be helpful for me to provide you with an appropriate solution for your application.
 

Regards,
Maya
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
Parthiv
Top achievements
Rank 1
answered on 04 Oct 2010, 09:04 AM
On CellDouble Click Event i want to open multiple window so please please try to understand whenever i click second time it will fire two times ,

please help me
0
Maya
Telerik team
answered on 04 Oct 2010, 11:25 AM
Hello Parthiv,

As you are implementing some custom logic, services and methods, I am not aware of your exact scenario and settings. However, I have tried to reproduce your issue and I am sending you the sample project. Please take a look at it and provide more information in case there is some misunderstanding according to your requirements. Any relevant code-snippets would be also of a help. 

Greetings,
Maya
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
Parthiv
Top achievements
Rank 1
answered on 07 Oct 2010, 09:56 AM
Hi Maya,

Thanks for your response.
i am using the same way infact same method i had applied but my issue is when i double click on any row for second time it will open two instance of Radwindow with same record i dont know why but onCellDoubleClick event fired two times and so on ,,,

example
i have 5 records in my grid when i double clikc on first row and very first time event will call only one time but if after that i ll click on 2nd row the oncelldouble click event fired two times and 3 and so on...


i hope now you understand my problem .......




0
Maya
Telerik team
answered on 11 Oct 2010, 08:56 AM
Hi Parthiv,

I am not able to reproduce the issue you specified. Are you capable of reproducing it on the sample project I sent to you ? 
 

Regards,
Maya
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
Parthiv
Top achievements
Rank 1
answered on 12 Oct 2010, 08:45 AM
Hi Maya,

I am not able to reproduce error in your solution but yes i had used the same code in my application and also not able to find why the same thing not working properly in my application

i dont whether you people give call support or not if yes then pls send me some contact info  or else if u need then we can talk on teamviewer so that you can view my application or wht else convienient way to intract....?????????????


Pls its my request
0
Maya
Telerik team
answered on 12 Oct 2010, 10:53 AM
Hi Parthiv,

We do not provide phone technical support and you may read this blog post explaining our reasons for that.
Considering your problem, it would be better if you could send us a sample project (via support ticket) demonstrating the issue so that we could debug it locally and provide you with a solution.
 

Regards,
Maya
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
Parthiv
Top achievements
Rank 1
Answers by
Maya
Telerik team
Parthiv
Top achievements
Rank 1
Share this question
or