According to this page http://www.infragistics.com/help/silverlight/xamGrid_Auto_Size_Columns_Using_Mouse_Clicks.html,
The Silverlight grid allows users to resize columns by double-clicking the resizing control on the edge of the column header.
Does the WebDataGrid or WebHierarchicalDataGrid have similar functionality?
If not, I have a second question.
I have tried to implement this myself, but I find that the grid does not throw the DoubleClick event when I double click the header if Column Resizing is turned on.
Is this the case or is there some way I can turn this on?
Hi gregehr,
Column Resizing on a mouse click (double-click) is not presently a feature of the column resizing behavior. This will be a new product idea for the WebDataGrid (and WHDG).
Infragistics invites you to submit this as a new product idea. To suggest a new product idea you can do so by navigating to http://ideas.infragistics.com The steps are easy to do:
1. Create a new UserVoice account and log in to the Infragistics Product Ideas site at http://ideas.infragistics.com.
2. Navigate to the product / platform channel of your choice (e.g. WPF, Windows Forms, ASP.NET, HTML5 / Ignite UI, iOS / NucliOS, etc.)
3. Review the feature suggestions already posted by the community.
4. Vote for the features you’d like to see added to the product.
5. If the feature you’re looking for has not been posted, you can add your own product idea. Make sure to be specific and provide as much detail as possible. Explain the context in which a feature would be used, why it is needed, why it can’t be accomplished today, and who would benefit from it. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it. Be convincing!
With this system, you are in the driver’s seat by submitting your product ideas. You can even track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.
For your follow-up question pertaining to the grid double-click event not firing when clicking a column header, when column resizing is enabled, I created a sample to test for this issue. Here I have been unable to reproduce this. I have included my test sample for your reference. Here you will see that when double-clicking on a column header, the double-click event does fire. Let me know if you are able to reproduce the grid double-click event not firing with my test sample. If so, let me know your precise steps-to-reproduce. Or if you can modify my sample such that it breaks, send it back to me and I will look further into this matter for you.
Please let me know if you need any additional assistance regarding this matter.
*Note that I omitted the style sheets due to file size constraints. For proper styling of the grid you will need to bring the ig_res folder back into the project. You can do this by opening the project in the designer and select 'OK' when prompted to accept the style sheets.
Thank you for your quick response.
On re-reading my post, I realize that I misstated the problem.
The double-click event stops firing when I have the SORTING behavior turned on; it does not seem to depend on resizing.
Perhaps you could test your example by enabling sorting and not setting any options for it. <ig:Sorting></ig:Sorting>
I did a retest with sorting turned-on and did see that the double-click event did fire. That being said, I can see that there could be a collision here between the sorting event and the double-click event, as the sorting event is going to fire on a single-click to the column header that is to be sorted. If the double-click is also on the column header, the single-click will fire first (sorting) followed immediately by double-click. At this point it is possible that there could be a conflict, particularly if the double-click isn't picked-up but instead two single clicks are responded too. For certain it is foreseeable that Sorting will always fire with a double-click.
BUT with my test, I see both events firing, sorting followed by double-click.
I now find that both the click event (for Sorting) and the double-click event fire.
The problem is that sorting does a post-back, which rebinds the data, and this overrides anything I do in the double-click event handler.
I think I could work around this IF I could turn off the sorting when the user double-clicks on the header.
I don't why the click event is firing on double-click in the first place.
The distinction between a single-click and a double-click is a fine line (event) and what is to 'happen' based on a single click will happen first. I'm not familiar with a good clean way to make the (sorting) not occur when a double-click is fired. And sorting will trigger a post-back.
Please let me know if you need any additional details regarding this inquiry.