[CLOSED] how to apply styles to a single row of the grid

  1. #1

    [CLOSED] how to apply styles to a single row of the grid

    How I can apply style to a grid row based on a value of store
    Last edited by Daniil; Aug 22, 2013 at 5:10 PM. Reason: [CLOSED]
  2. #2
    Inside Gridview tag:

    <GetRowClass Fn="checkMyRow" />
    Function:

    
            var checkMyRow= function (record) {
                if (record.data.SomeProperty == "abc" ) {
                    return "YourCssClassName";
                } 
            }
  3. #3
    Quote Originally Posted by blueworld View Post
    Inside Gridview tag:

    <GetRowClass Fn="checkMyRow" />
    Function:

    
            var checkMyRow= function (record) {
                if (record.data.SomeProperty == "abc" ) {
                    return "YourCssClassName";
                } 
            }

    THIS DOES NOT WORK, I DID SO:

                      <View>
                    <ext:GridView runat ="server" >
                    <GetRowClass Fn ="PresupActual" /> 
                    </ext:GridView>
                    </View>

    var PresupActual= function (record) {
               if (record.data.Presupuesto == "PRE001") {
               return "PresupActual";
                } 
             }

      <style type ="text/css" >
         .PresupActual
         {
              font-weight: bold !important;
              color:Blue !important; 
             }
             
        </style>
    Last edited by JCarlosF; Aug 22, 2013 at 3:05 PM.
  4. #4
    Quote Originally Posted by JCarlosF View Post
    THIS DOES NOT WORK, I DID SO:

                      <View>
                    <ext:GridView runat ="server" >
                    <GetRowClass Fn ="PresupActual" /> 
                    </ext:GridView>
                    </View>
    Where is the difference? Maybe you missunderstood what I've meant with "inside" GridView
  5. #5
    Quote Originally Posted by blueworld View Post
    where is the difference? Maybe you missunderstood what i've meant with "inside" gridview
    my code does not work, where should go the label getrowclass ?


    Thanks!
  6. #6
    Try this:

    
            .PresupActual .x-grid-cell, .dirty-row .x-grid-rowwrap-div {
                background-color: blue !important;
                font-weight: bold !important;
            }
  7. #7
    Quote Originally Posted by blueworld View Post
    Try this:

    
            .PresupActual .x-grid-cell, .dirty-row .x-grid-rowwrap-div {
                background-color: blue !important;
                font-weight: bold !important;
            }

    Excellent blueworld, this worked, thanks!

Similar Threads

  1. [CLOSED] How To Apply Styles/Css to Dynamic Created controls..
    By Tonic in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 24, 2013, 11:37 AM
  2. Replies: 2
    Last Post: Mar 08, 2013, 5:00 PM
  3. [CLOSED] How to Apply Styles To TopBar
    By Vasudhaika in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 12, 2010, 3:36 AM
  4. [CLOSED] Styles don't apply to labels in toolbar
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 30, 2010, 2:35 PM
  5. [CLOSED] [1.0] EditableGrid Apply to selection apply to all
    By ashton.lamont in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Feb 24, 2010, 5:49 PM

Posting Permissions