Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. datagrid

datagrid

Scheduled Pinned Locked Moved ASP.NET
question
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    musnet2007
    wrote on last edited by
    #1

    How can i change the datagrid row colour alternatively. for ex: 1st row red 2nd row blue 3rd row red 4th row blue like that with any conditions apply

    T S 2 Replies Last reply
    0
    • M musnet2007

      How can i change the datagrid row colour alternatively. for ex: 1st row red 2nd row blue 3rd row red 4th row blue like that with any conditions apply

      T Offline
      T Offline
      Tamimi Code
      wrote on last edited by
      #2

      check the AlternatingItemStyle property

      When you get mad...THINK twice that the only advice Tamimi - Code

      M 1 Reply Last reply
      0
      • M musnet2007

        How can i change the datagrid row colour alternatively. for ex: 1st row red 2nd row blue 3rd row red 4th row blue like that with any conditions apply

        S Offline
        S Offline
        Sathesh Sakthivel
        wrote on last edited by
        #3

        var obj = new AW.UI.Grid; obj.setCellData(function(col, row){return col + "." + row}); obj.setHeaderText(function(i){return "Col " + i}); obj.setColumnCount(10); obj.setRowCount(100); // create new row property obj.defineRowProperty("color", function(row){ return this.getCellData(0, row).match("1") ? "red" : "blue"; }) // link row background to row color property obj.getRowTemplate().setStyle("background", function(){ return this.getRowProperty("color"); }); Hope this will help you.

        Regards, Satips.:rose:

        1 Reply Last reply
        0
        • T Tamimi Code

          check the AlternatingItemStyle property

          When you get mad...THINK twice that the only advice Tamimi - Code

          M Offline
          M Offline
          musnet2007
          wrote on last edited by
          #4

          thankz i found out just before after sending message

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups