[FIXED] [#693] [3.1.0] TreeGrid with alternating color grid

  1. #1

    [FIXED] [#693] [3.1.0] TreeGrid with alternating color grid

    Hi,

    Is it possible to have a TreeGrid with alternating row colors just like a regular gridpanel?

    I'm using the MVC version 2.5

    Thanks,
    Leo
    Last edited by Daniil; Feb 11, 2015 at 6:13 AM. Reason: [FIXED] [#693] [3.1.0]
  2. #2
    Hello @leonardm,

    I suppose you are using MVC + razor for view building. Right?..

    Well, If you are using ASP engine like some do, you just add
                <ViewConfig>
                    <CustomConfig>
                        <ext:ConfigItem Name="StripeRows" Value="true" />
                    </CustomConfig>
                </ViewConfig>
    Between your TreePanel tags.

    Now, for MVC syntax, it would be:

    @(Html.X().TreePanel()
    .ViewConfig(
    Html.X().TreeView().CustomConfig(conf => conf.Add(new ConfigItem { Name="StripeRows", Value="true" }))
    )
    .Root( (...) )
    )


    I hope this helps!
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Thanks for that! Works perfectly.

    Please close this thread.

    Leo
  4. #4
    Glad I was able to help! (credits to @daniil)
    Fabrício Murta
    Developer & Support Expert
  5. #5
  6. #6
    Hello everybody,

    Created an Issue: TreeView: no StripeRows setting.

    Added in the revision #6322 (trunk). It goes to 3.1.0.


    Added a breaking change item that the StripeRows property has been moved from GridView to TableView (the subclass of GridView and TreeView).
  7. #7
    Thank you Daniil. I am gonna review it.
  8. #8
    Daniil, i reviewed and everything seems is ok. Once again, thank you.

    I just one more thing to add: StripeRows is enable by default in GridView, but it's disabled by default in TreeView. In your opinion, would it be better if both behave the same?
  9. #9
    I am not sure what is the reason of having false for a TreeView. It comes from ExtJS. Personally, I am reluctant to change that.
    http://docs.sencha.com/extjs/5.1/5.1...cfg-stripeRows
  10. #10
    I am not sure what is the reason of having false for a TreeView. It comes from ExtJS. Personally, I am reluctant to change that.
    http://docs.sencha.com/extjs/5.1/5.1...cfg-stripeRows
    I completely agree with you. Sorry for not checking Ext.Js's documentation.

Similar Threads

  1. Replies: 5
    Last Post: Sep 03, 2012, 1:38 PM
  2. [CLOSED] Alternating background colors of a listview row
    By mattwoberts in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 23, 2011, 2:35 PM
  3. TreeGrid - fore color of a node
    By Kedar in forum 1.x Help
    Replies: 1
    Last Post: Jan 11, 2011, 7:45 AM
  4. [CLOSED] TreeGrid with Checkbox Grid
    By macap in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 11, 2010, 1:45 PM
  5. How to change color scheme of grid?
    By dbassett74 in forum 1.x Help
    Replies: 0
    Last Post: Apr 20, 2009, 12:08 PM

Tags for this Thread

Posting Permissions