Default View in PropertyGrid

11 posts, 0 answers
  1. Jason
    Jason avatar
    10 posts
    Member since:
    Nov 2006

    Posted 01 Aug 2011 Link to this post


    How do I set the default, initial view for a PropertyGrid to display categorized/grouped instead of listed Alphabetically?

    This was answered for WPF

    http://www.telerik.com/community/forums/wpf/property-grid/default-view-in-propertygrid.aspx

    How would you do this in the Silverlight Version of the PropertyGrid

    Thanks
  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 02 Aug 2011 Link to this post

    Hi Jason,

    The exact same approach is applicable for Silverlight as well. Still, we will try to implement setting the grid in a grouped state as a built-in feature. Unfortunately, no time frame may be defined when this functionality will be included. 
    Let me know in case you need any further assistance.
     

    Greetings,
    Maya
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  3. DevCraft banner
  4. Derek
    Derek avatar
    6 posts
    Member since:
    Sep 2007

    Posted 18 Aug 2011 Link to this post

    Hi

    I implemented the WPF fix in Silverlight and it fails to find any RadRadioButtons in this line of code:

    var button = this.PersonDetailPropertyGrid.ChildrenOfType<RadRadioButton>().Where(b => b.Name == "groupButton").First();


    Has anyone had this working?





    Thanks D.
  5. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 19 Aug 2011 Link to this post

    Hi Derek,

    I have tested the case, but still it works correctly on my side. I am attaching the sample I use for the case. Please take a look at it and let me know in case of any misunderstandings.
     

    All the best,
    Maya
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  6. Derek
    Derek avatar
    6 posts
    Member since:
    Sep 2007

    Posted 19 Aug 2011 Link to this post

    Hi Maya

    Thanks for the quick reply.  I'm trying to do this in Silverlight, the PropertyGrid is inside a RadOutlookBar but I wouldn't expect that to make any difference.  The attached image shows my code and the error I get.

    Thanks.  D.
  7. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 19 Aug 2011 Link to this post

    Hi Derek,

    Please excuse me for the misunderstanding. I have prepared an example targeting Silverlight, but sill I am not able to get the same exception. I am attaching the application. May you take a look at it and let me know whether I need to add something so that to be capable of reproducing the case ? 
     

    Greetings,
    Maya
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  8. Derek
    Derek avatar
    6 posts
    Member since:
    Sep 2007

    Posted 23 Aug 2011 Link to this post

    Hi Maya

    I've tested your example app and it did indeed work, however when I place the PropertyGrid inside a RadOutlookItem which is inside a RadOutlookBar I get the error I reported.

    Regards

    Derek
  9. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 24 Aug 2011 Link to this post

    Hello Derek,

    You can try to perform the exact same logic in the Loaded event of the property grid:

    private void myPropertyGrid_Loaded(object sender, System.Windows.RoutedEventArgs e)
            {
                var button = this.myPropertyGrid.ChildrenOfType<RadRadioButton>().Where(b => b.Name == "groupButton").FirstOrDefault();
                button.IsChecked = true;
            }

    I am sending you the updated project so that you may test the functionality.
      Greetings,
    Maya
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  10. Derek
    Derek avatar
    6 posts
    Member since:
    Sep 2007

    Posted 24 Aug 2011 Link to this post

    Hi Maya

    That worked, thanks for your help.  One more small question; is there a way to change the order of the grouping? It's alphabetical by default which isn't ideal for my UI.

    Derek
  11. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 25 Aug 2011 Link to this post

    Hello Derek,

    Unfortunately, such functionality is not supported by RadPropertyGrid.
    Still, let me know in case you need any further assistance.

     

    Greetings,
    Maya
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  12. ramesh
    ramesh avatar
    5 posts
    Member since:
    Feb 2011

    Posted 07 Nov 2011 Link to this post

    Hi maya,

    i have some problems with RadpropertyGrid, i.e 

    default the TextBoxes in the radpropertygrid are editable mode, according to my requirements default am changing the EditorTemplate(Like Texbox isEnabled=false ,so the texboxes in the radpropertygrid are readonly  mode), and when i click  my own button am changing the EditorTemplate to editable mode(i.eTexbox isEnabled=true, we can enter text here in the texbox),

    problems are
    1)when i enter text in to search box of RadPropertyGrid ...>the search results shows default one i.e texbox isEnabled=false(if am in editable mode i.e Texbox isEnabled=true)

    2)when i try to click groupButton and sortButton the result templates are different. present am in groupButton and texboxes are Editable mode, if am click sort button the texboxes are mode of radpropertygrid loaded time(either readonly are editable)

    3) presentely am in group mode---->if am try to bind the data(any event changes) ..it does't shows the data in group mode(but data is   there),  if am click the sort button and back to groupbutton it shows the data.why it  does't shows the data in group mode if am binding data?

    see the below attached images in each case

Back to Top
DevCraft banner