Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1921
Hierarchical grid - image to expand / collapse
posted

Hi

I have question with hierarchical grid.

In hierarchical grid we are using the + / - for expand and collapse the grid.

I want to place a next to minus (-) sign  image (Like folder open image) when that grid expanding mode.

and change the (next to + plus sign) image (Like folder close image) automatically when that grid collapsing. 

you help is highly appreciated. thanks.

by

ramesh

  • 1230
    posted

    i would also like to replace the expander image with my own image.  The child records in this case ar individual people scheduled on a task and I want to replace + and - with a "people" icon.  I do not have a solution but maybe if another person asks we will get a response.

    • 69686
      posted in reply to Robert

      Hello,

      Responce, true.

      To achieve this you have to create a style for the RecordSelector. You can see the base/default style in the DefaultStyles directory installed together with out products in the Infragistics folder. You have to retemplate the record selector to change + and - signs.

      Hope this helps.

      Alex.

      • 138253
        Offline posted in reply to Nick

        Hello David,

         

        Thank you for your post. I have been looking into it and I have modified the sample that Alex uploaded in the forum thread you provided, so now it works as you want. If you group by the second field the expansion indicators will be different. Basically I used converters in the Images’ Source Properties to set a different picture depending on which Fields is grouped and whether it is grouped at all.

         

        Hope this helps you.

        testGridCollection.zip
        • 185
          posted in reply to John Doe

           

          Hi Alex, I know that this post (http://community.infragistics.com/forums/p/18938/81442.aspx#81442) was some time ago now, but it would be really useful if this example could be extended to show how the plus/minus images could be different depending on which field was grouped...so that I can do something like explorer where the icon displayed is different depending on the folder type that is being expanded.

          Thanks,

          David 

           

          • 69686
            posted in reply to Mital

            Hello,

            Yes, the best way to do this is in the InitializeRecord event set 

            e.Record.IsExpanded = true;

            Alex.

            • 310
              posted in reply to Mital

              Hi,

               I found the solution I tired using 
              ExpandableFieldRecordExpansionMode = ExpandableFieldRecordExpansionMode.ExpandAlways
              but no use :(
              Then in IntializedRecord Event I set currentRecord.IsExpanded=True. Which is working fine.

               

              • 310
                posted in reply to John Doe

                Hi Alex,

                Is there any way which always keeps the expander as expanded by default.