3 Answers, 1 is accepted
0
Hello Prashant,
Thank you for contacting Telerik Support.
In order to expand/collapse the specific category on double click, it is necessary to subscribe to the ItemMouseDoubleClick event and revert the PropertyGridGroupItem.Expanded property:
I hope this information helps. Should you have further questions, I would be glad to help.
Regards,
Desislava
Telerik
Thank you for contacting Telerik Support.
In order to expand/collapse the specific category on double click, it is necessary to subscribe to the ItemMouseDoubleClick event and revert the PropertyGridGroupItem.Expanded property:
public Form1(){ InitializeComponent(); radPropertyGrid1.PropertySort = PropertySort.Categorized; radPropertyGrid1.SelectedObject = new Item(1234, "Custom title", "Description", 9834657); radPropertyGrid1.ItemMouseDoubleClick += radPropertyGrid1_ItemMouseDoubleClick;}private void radPropertyGrid1_ItemMouseDoubleClick(object sender, RadPropertyGridEventArgs e){ PropertyGridGroupItem groupItem = e.Item as PropertyGridGroupItem; if (groupItem != null) { groupItem.Expanded = !groupItem.Expanded; }}public class Item{ [Category("Category1")] public int Id { get; set; } [Category("Category2")] public string Title { get; set; } [Category("Category2")] public string Description { get; set; } [Category("Category1")] public int BarCode { get; set; } public Item(int id, string title, string description, int barCode) { this.Id = id; this.Title = title; this.Description = description; this.BarCode = barCode; }}I hope this information helps. Should you have further questions, I would be glad to help.
Desislava
Telerik
Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.
0
Prashant
Top achievements
Rank 1
answered on 25 Mar 2014, 04:08 PM
Thanks Desislava,
Just wondering, Shouldn't this be a default behavior of a PropertyGrid ?
Like there is a default context menu, to category bar, double click to expand collapse should be a default behavior as well.
Thats how it works in Visual Studio. For TreeView nodes., Windows Explorer etc places where things can be expand and collapsed
Image from windows explorer
![]()
Just wondering, Shouldn't this be a default behavior of a PropertyGrid ?
Like there is a default context menu, to category bar, double click to expand collapse should be a default behavior as well.
Thats how it works in Visual Studio. For TreeView nodes., Windows Explorer etc places where things can be expand and collapsed
Image from windows explorer
0
Hello Prashant,
Thank you for writing back.
It is a reasonable request, indeed. I have logged it in our Feedback Portal. You can track its progress, subscribe for status changes and add your vote/comment to it on the following link - Feedback Item.
I have also updated your Telerik points.
Please do not hesitate to contact us if you have any additional questions.
Regards,
Desislava
Telerik
Thank you for writing back.
It is a reasonable request, indeed. I have logged it in our Feedback Portal. You can track its progress, subscribe for status changes and add your vote/comment to it on the following link - Feedback Item.
I have also updated your Telerik points.
Please do not hesitate to contact us if you have any additional questions.
Regards,
Desislava
Telerik
Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.
