We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Double clicking event

Is there a way to trap the user''s double clicking on a column header event?

20 Replies

AD Administrator Syncfusion Team March 22, 2005 09:44 PM UTC

Hi Anthony, here is some sample code that does this: this.groupingGrid1.TableOptions.AllowDragColumns = false; this.groupingGrid1.TableOptions.AllowSortColumns = false; this.groupingGrid1.TableControlCellDoubleClick += new GridTableControlCellClickEventHandler(groupingGrid1_TableControlCellDoubleClick); private void groupingGrid1_TableControlCellDoubleClick(object sender, GridTableControlCellClickEventArgs e) { MessageBox.Show("Doubleclick"); } Stefan >Is there a way to trap the user''s double clicking on a column header event?


AA Anthony Avella March 23, 2005 04:41 PM UTC

Actually here''s what I need: 1 - I need to trap the mouse double-click event when a user double-clicks a column header cell (to perform custom sorting on the summary rows of the grid). 2- I need to able to highlight all the rows in a column when a user single clicks on the column''s header cell (we currently have this functionality in version 1.6). 3- I need to preserve the user''s abitlity to drag and sort columns. In regards to your suggestions below... They work (I''m able to trap the double click event on a header cell), but when I set the AllowDragColumns and AllowSortColumns properties to false, I lose the ability to move columns around the grid as well as sort the detail rows. I need these. How can I meet my needs listed above? >Hi Anthony, > >here is some sample code that does this: > > > this.groupingGrid1.TableOptions.AllowDragColumns = false; > this.groupingGrid1.TableOptions.AllowSortColumns = false; > this.groupingGrid1.TableControlCellDoubleClick += new GridTableControlCellClickEventHandler(groupingGrid1_TableControlCellDoubleClick); > > private void groupingGrid1_TableControlCellDoubleClick(object sender, GridTableControlCellClickEventArgs e) > { > > MessageBox.Show("Doubleclick"); > > } > > >Stefan > >>Is there a way to trap the user''s double clicking on a column header event?


AA Anthony Avella March 24, 2005 07:30 PM UTC

Hi What is the status of this issue? >Actually here''s what I need: > >1 - I need to trap the mouse double-click event when a user double-clicks a column header cell (to perform custom sorting on the summary rows of the grid). > >2- I need to able to highlight all the rows in a column when a user single clicks on the column''s header cell (we currently have this functionality in version 1.6). > >3- I need to preserve the user''s abitlity to drag and sort columns. > > >In regards to your suggestions below... > >They work (I''m able to trap the double click event on a header cell), but when I set the AllowDragColumns and AllowSortColumns properties to false, I lose the ability to move columns around the grid as well as sort the detail rows. I need these. > >How can I meet my needs listed above? > >>Hi Anthony, >> >>here is some sample code that does this: >> >> >> this.groupingGrid1.TableOptions.AllowDragColumns = false; >> this.groupingGrid1.TableOptions.AllowSortColumns = false; >> this.groupingGrid1.TableControlCellDoubleClick += new GridTableControlCellClickEventHandler(groupingGrid1_TableControlCellDoubleClick); >> >> private void groupingGrid1_TableControlCellDoubleClick(object sender, GridTableControlCellClickEventArgs e) >> { >> >> MessageBox.Show("Doubleclick"); >> >> } >> >> >>Stefan >> >>>Is there a way to trap the user''s double clicking on a column header event?


AD Administrator Syncfusion Team March 28, 2005 03:00 PM UTC

Anthony, I uploaded a sample that handles both the CellClick and CellDoubleClick event to hightlight a column and/or sort it. Right now you will need to implement a custom mouse controller to get the double click while still being able to drag columns. We will change this in our code so that in future you will not need to derive the grid and instantiate a custome mouse controller. The sample is here: CustomSectionInGroupWithCustomSortAndDoubleClick.zip Stefan


AD Administrator Syncfusion Team March 28, 2005 03:34 PM UTC

You might have trouble compiling previous example with 3.0. I commented out some line so that it compiles with 3.0 version. CS.zip Stefan >Anthony, > >I uploaded a sample that handles both the CellClick and CellDoubleClick event to hightlight a column and/or sort it. > >Right now you will need to implement a custom mouse controller to get the double click while still being able to drag columns. > >We will change this in our code so that in future you will not need to derive the grid and instantiate a custome mouse controller. > >The sample is here: CustomSectionInGroupWithCustomSortAndDoubleClick.zip > >Stefan


AA Anthony Avella April 5, 2005 08:01 PM UTC

When I add these derived classes in, I get the following error in my output window: Deactivate called while the current cell was in process of activating or deactivating a cell. Calling CurrentCell.Lock() will prevent this exception. How do I get rid of this exception? If I need to call CurrentCell.Lock(), when/where would I do it? In my output window, I never see the writeline calls (ex: Console.WriteLine("MouseUp " + e.Clicks.ToString());) that are in the derived classes. This leads me to believe the grid is not using them. MustI do anything specific for the grid to use these derived classes? Your comments mention deriving the grid itself. I did not notice this in your sample. We have already derived a child grid (public class DGridGroupingControl : GridGroupingControl) to override ProcessCmdKey. Do we need to incorporate these new grid changes into this derived class in any way? Thanks. >You might have trouble compiling previous example with 3.0. I commented out some line so that it compiles with 3.0 version. > >CS.zip > >Stefan > >>Anthony, >> >>I uploaded a sample that handles both the CellClick and CellDoubleClick event to hightlight a column and/or sort it. >> >>Right now you will need to implement a custom mouse controller to get the double click while still being able to drag columns. >> >>We will change this in our code so that in future you will not need to derive the grid and instantiate a custome mouse controller. >> >>The sample is here: CustomSectionInGroupWithCustomSortAndDoubleClick.zip >> >>Stefan


AD Administrator Syncfusion Team April 5, 2005 10:34 PM UTC

Hi Anthony, this line is key: // GroupingEngineFactory provides a modified GridChildTable that adds an extra section GridEngineFactory.Factory = new GroupingEngineFactory(); this will tell your base GridGroupingControl to instantiate a GroupingEngine. And that GroupingEngine then has overriden CreateTableControl and CreateNestedTableControl methods. Can you double check you the above line and the CreateTableControl and CreateNestedTableControl methods in? When you set a break point in CustomTableControlDragHeaderMouseController does it get hit? If that''s the case. Were you able to test-drive it with the example I sent? What is the difference to your project? Like I also said - the 3.2 version will have the problem fixed that no Click was raised. If you keep having trouble you could wait until we have that version out and try again then (if that''s an option for you) Stefan >When I add these derived classes in, I get the following error in my output window: > >Deactivate called while the current cell was in process of activating or deactivating a cell. Calling CurrentCell.Lock() will prevent this exception. > >How do I get rid of this exception? >If I need to call CurrentCell.Lock(), when/where would I do it? > >In my output window, I never see the writeline calls (ex: Console.WriteLine("MouseUp " + e.Clicks.ToString());) that are in the derived classes. This leads me to believe the grid is not using them. > >MustI do anything specific for the grid to use these derived classes? > >Your comments mention deriving the grid itself. I did not notice this in your sample. We have already derived a child grid (public class DGridGroupingControl : GridGroupingControl) to override ProcessCmdKey. Do we need to incorporate these new grid changes into this derived class in any way? > >Thanks. > > >>You might have trouble compiling previous example with 3.0. I commented out some line so that it compiles with 3.0 version. >> >>CS.zip >> >>Stefan >> >>>Anthony, >>> >>>I uploaded a sample that handles both the CellClick and CellDoubleClick event to hightlight a column and/or sort it. >>> >>>Right now you will need to implement a custom mouse controller to get the double click while still being able to drag columns. >>> >>>We will change this in our code so that in future you will not need to derive the grid and instantiate a custome mouse controller. >>> >>>The sample is here: CustomSectionInGroupWithCustomSortAndDoubleClick.zip >>> >>>Stefan


AA Anthony Avella April 6, 2005 01:18 PM UTC

Hi Stefan, My code does call GridEngineFactory.Factory = new GroupingEngineFactory();. Does my DGridGroupingControl class need to override the CreateTableControl and CreateNestedTableControl methods, or do I need to override the GroupingEngineFactory class and override those two functions? If I do need to override the GroupingEngineFactory class, do I need to call it at all? Does my DGridGroupingControl class need to create it? If I need to override the CreateTableControl and CreateNestedTableControl methods what are their signatures and what new code needs to be added in the overrides? When I set a break point in CustomTableControlDragHeaderMouseController it does not get hit. When will the 3.2 version be available? >Hi Anthony, > >this line is key: > >// GroupingEngineFactory provides a modified GridChildTable that adds an extra section >GridEngineFactory.Factory = new GroupingEngineFactory(); > >this will tell your base GridGroupingControl to instantiate a GroupingEngine. And that GroupingEngine then has overriden CreateTableControl and CreateNestedTableControl methods. > >Can you double check you the above line and the >CreateTableControl and CreateNestedTableControl methods in? > >When you set a break point in CustomTableControlDragHeaderMouseController does it get hit? > >If that''s the case. Were you able to test-drive it with the example I sent? What is the difference to your project? > >Like I also said - the 3.2 version will have the problem fixed that no Click was raised. If you keep having trouble you could wait until we have that version out and try again then (if that''s an option for you) > >Stefan > > >>When I add these derived classes in, I get the following error in my output window: >> >>Deactivate called while the current cell was in process of activating or deactivating a cell. Calling CurrentCell.Lock() will prevent this exception. >> >>How do I get rid of this exception? >>If I need to call CurrentCell.Lock(), when/where would I do it? >> >>In my output window, I never see the writeline calls (ex: Console.WriteLine("MouseUp " + e.Clicks.ToString());) that are in the derived classes. This leads me to believe the grid is not using them. >> >>MustI do anything specific for the grid to use these derived classes? >> >>Your comments mention deriving the grid itself. I did not notice this in your sample. We have already derived a child grid (public class DGridGroupingControl : GridGroupingControl) to override ProcessCmdKey. Do we need to incorporate these new grid changes into this derived class in any way? >> >>Thanks. >> >> >>>You might have trouble compiling previous example with 3.0. I commented out some line so that it compiles with 3.0 version. >>> >>>CS.zip >>> >>>Stefan >>> >>>>Anthony, >>>> >>>>I uploaded a sample that handles both the CellClick and CellDoubleClick event to hightlight a column and/or sort it. >>>> >>>>Right now you will need to implement a custom mouse controller to get the double click while still being able to drag columns. >>>> >>>>We will change this in our code so that in future you will not need to derive the grid and instantiate a custome mouse controller. >>>> >>>>The sample is here: CustomSectionInGroupWithCustomSortAndDoubleClick.zip >>>> >>>>Stefan


AD Administrator Syncfusion Team April 6, 2005 03:51 PM UTC

Anthony, You need to override these methods in GroupingEngineFactory. In your derived GridGroupingControl you can force creation of the GroupingEngineFactory when you use this ctor: class DGridGroupingControl { public DGridGroupingControl() : base(new GroupingEngineFactory()) { } ... } Then you do not need the line GridEngineFactory.Factory = new GroupingEngineFactory();. The 3.2 version is now available for download. See http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=27091 Please contact salessupport@syncfusion.com or open a direct-trac incident for getting the product key for this version. Stefan >Hi Stefan, > >My code does call GridEngineFactory.Factory = new GroupingEngineFactory();. > >Does my DGridGroupingControl class need to override the CreateTableControl and CreateNestedTableControl methods, or do I need to override the GroupingEngineFactory class and override those two functions? > >If I do need to override the GroupingEngineFactory class, do I need to call it at all? Does my DGridGroupingControl class need to create it? > >If I need to override the CreateTableControl and CreateNestedTableControl methods what are their signatures and what new code needs to be added in the overrides? > >When I set a break point in CustomTableControlDragHeaderMouseController it does not get hit. > >When will the 3.2 version be available? >


AA Anthony Avella April 8, 2005 01:00 PM UTC

I''ve upgraded to version 3.2 of the grid. Do I still need to override the classes in your last response, or can I just use the code you wrote in your event handlers from the last response? >Anthony, > >You need to override these methods in GroupingEngineFactory. > >In your derived GridGroupingControl you can force creation of the GroupingEngineFactory when you use this ctor: > >class DGridGroupingControl >{ >public DGridGroupingControl() >: base(new GroupingEngineFactory()) >{ >} >... >} > >Then you do not need the line >GridEngineFactory.Factory = new GroupingEngineFactory();. > >The 3.2 version is now available for download. > >See http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=27091 > >Please contact salessupport@syncfusion.com or open a direct-trac incident for getting the product key for this version. > >Stefan > > >>Hi Stefan, >> >>My code does call GridEngineFactory.Factory = new GroupingEngineFactory();. >> >>Does my DGridGroupingControl class need to override the CreateTableControl and CreateNestedTableControl methods, or do I need to override the GroupingEngineFactory class and override those two functions? >> >>If I do need to override the GroupingEngineFactory class, do I need to call it at all? Does my DGridGroupingControl class need to create it? >> >>If I need to override the CreateTableControl and CreateNestedTableControl methods what are their signatures and what new code needs to be added in the overrides? >> >>When I set a break point in CustomTableControlDragHeaderMouseController it does not get hit. >> >>When will the 3.2 version be available? >> >


AA Anthony Avella April 8, 2005 01:40 PM UTC

Since I''ve downloaded version 3.2, I''m unable to trap the grid''s double click event on detail rows and column header rows. You last response led me to believe I''d be able to capture both. What do I need to do? >Anthony, > >You need to override these methods in GroupingEngineFactory. > >In your derived GridGroupingControl you can force creation of the GroupingEngineFactory when you use this ctor: > >class DGridGroupingControl >{ >public DGridGroupingControl() >: base(new GroupingEngineFactory()) >{ >} >... >} > >Then you do not need the line >GridEngineFactory.Factory = new GroupingEngineFactory();. > >The 3.2 version is now available for download. > >See http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=27091 > >Please contact salessupport@syncfusion.com or open a direct-trac incident for getting the product key for this version. > >Stefan > > >>Hi Stefan, >> >>My code does call GridEngineFactory.Factory = new GroupingEngineFactory();. >> >>Does my DGridGroupingControl class need to override the CreateTableControl and CreateNestedTableControl methods, or do I need to override the GroupingEngineFactory class and override those two functions? >> >>If I do need to override the GroupingEngineFactory class, do I need to call it at all? Does my DGridGroupingControl class need to create it? >> >>If I need to override the CreateTableControl and CreateNestedTableControl methods what are their signatures and what new code needs to be added in the overrides? >> >>When I set a break point in CustomTableControlDragHeaderMouseController it does not get hit. >> >>When will the 3.2 version be available? >> >


AD Administrator Syncfusion Team April 8, 2005 08:55 PM UTC

My bad ... I just found out I forgot to check in that change that raises the CellDoubleClick event. I checked in the code change now into sourcesafe and it will be part of the 3.2.1 release. We will have that ready early next week. Sorry. Stefan >Since I''ve downloaded version 3.2, I''m unable to trap the grid''s double click event on detail rows and column header rows. >You last response led me to believe I''d be able to capture both. >What do I need to do? > >>Anthony, >> >>You need to override these methods in GroupingEngineFactory. >> >>In your derived GridGroupingControl you can force creation of the GroupingEngineFactory when you use this ctor: >> >>class DGridGroupingControl >>{ >>public DGridGroupingControl() >>: base(new GroupingEngineFactory()) >>{ >>} >>... >>} >> >>Then you do not need the line >>GridEngineFactory.Factory = new GroupingEngineFactory();. >> >>The 3.2 version is now available for download. >> >>See http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=27091 >> >>Please contact salessupport@syncfusion.com or open a direct-trac incident for getting the product key for this version. >> >>Stefan >> >> >>>Hi Stefan, >>> >>>My code does call GridEngineFactory.Factory = new GroupingEngineFactory();. >>> >>>Does my DGridGroupingControl class need to override the CreateTableControl and CreateNestedTableControl methods, or do I need to override the GroupingEngineFactory class and override those two functions? >>> >>>If I do need to override the GroupingEngineFactory class, do I need to call it at all? Does my DGridGroupingControl class need to create it? >>> >>>If I need to override the CreateTableControl and CreateNestedTableControl methods what are their signatures and what new code needs to be added in the overrides? >>> >>>When I set a break point in CustomTableControlDragHeaderMouseController it does not get hit. >>> >>>When will the 3.2 version be available? >>> >>


AA Anthony Avella April 10, 2005 08:58 PM UTC

In regards to the new release (3.2.1) handling both single and double click events: Will I need to do any inheritance? Will I need to set the AllowDragColumns or the AllowSortColumns flags? Will I need to put any specific code in the grid''s single and double click event handlers to allow for the both to be handled in column header, summary and detail rows? Thanks.


AD Administrator Syncfusion Team April 11, 2005 07:59 PM UTC

Hi Anthony, no will not need to do any inheritance. AllowDragColumns can be set to true (the default) AllowSortColumns must be changed to false since you do want different behavior for that click. You can handle TableControlCellDoubleClick for the sorting. For the column selection you could use the TableControlCellClick and TableControlPrepareViewStyleInfo suggestion I made in that sample. Or if you do use the AllowSelection selection mechanism you could add the column range to TableModel.Selections. Stefan


AA Anthony Avella April 12, 2005 12:28 PM UTC

Great. Thanks. When do you expect to release the left out changes? Do we need a new key for downloading?


AD Administrator Syncfusion Team April 12, 2005 05:33 PM UTC

Should be out real soon. You''ll get a new key for that version but the setup also has automatic key retrieval. Stefan >Great. >Thanks. > >When do you expect to release the left out changes? > >Do we need a new key for downloading? >


AA Anthony Avella April 14, 2005 01:05 PM UTC

Any word on release yet? How will I know when it''s released? >Should be out real soon. You''ll get a new key for that version but the setup also has automatic key retrieval. > >Stefan > >>Great. >>Thanks. >> >>When do you expect to release the left out changes? >> >>Do we need a new key for downloading? >>


AD Administrator Syncfusion Team April 14, 2005 09:05 PM UTC

Just keep an eye on http://www.syncfusion.com/Support/Forums/forum.aspx?ForumID=1 Stefan >Any word on release yet? > >How will I know when it''s released? > >>Should be out real soon. You''ll get a new key for that version but the setup also has automatic key retrieval. >> >>Stefan >> >>>Great. >>>Thanks. >>> >>>When do you expect to release the left out changes? >>> >>>Do we need a new key for downloading? >>>


AA Anthony Avella April 15, 2005 11:48 AM UTC

Hey. That thread is saying there is no new release coming out. Does this mean your click event changes will not be released as you''ve promised? Pease advise. Our production release in hinging on this. Thanks. >Just keep an eye on > >http://www.syncfusion.com/Support/Forums/forum.aspx?ForumID=1 > >Stefan > >>Any word on release yet? >> >>How will I know when it''s released? >> >>>Should be out real soon. You''ll get a new key for that version but the setup also has automatic key retrieval. >>> >>>Stefan >>> >>>>Great. >>>>Thanks. >>>> >>>>When do you expect to release the left out changes? >>>> >>>>Do we need a new key for downloading? >>>>


AD Administrator Syncfusion Team April 15, 2005 09:02 PM UTC

You have my word. That specific change will be in that release. Stefan >Hey. > >That thread is saying there is no new release coming out. Does this mean your click event changes will not be released as you''ve promised? > >Pease advise. Our production release in hinging on this. > >Thanks. > >>Just keep an eye on >> >>http://www.syncfusion.com/Support/Forums/forum.aspx?ForumID=1 >> >>Stefan >> >>>Any word on release yet? >>> >>>How will I know when it''s released? >>> >>>>Should be out real soon. You''ll get a new key for that version but the setup also has automatic key retrieval. >>>> >>>>Stefan >>>> >>>>>Great. >>>>>Thanks. >>>>> >>>>>When do you expect to release the left out changes? >>>>> >>>>>Do we need a new key for downloading? >>>>>

Loader.
Live Chat Icon For mobile
Up arrow icon