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
  1. Home
  2. Web Development
  3. ASP.NET
  4. Problem in Runtime format cell

Problem in Runtime format cell

Scheduled Pinned Locked Moved ASP.NET
cssdatabasecomdebuggingtools
5 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.
  • S Offline
    S Offline
    Sun Rays
    wrote on last edited by
    #1

    Hi friends, I am having one porblem to format cell's CssClass runtime. I have written below code in GridView_RowDataBound int no; // fetching from database if(no < 3) { e.Row.Cells[1].CssClass = "MyClass"; } Here problem is there that, If I am putting debug point then Its showing correctly. But if I am not putting any debug point and running application then its updating all row's cell format as per last Css. Dont know whats problem with it ?

    Thanks, Sun Rays To get something you must have to try once. My Articles

    I N 2 Replies Last reply
    0
    • S Sun Rays

      Hi friends, I am having one porblem to format cell's CssClass runtime. I have written below code in GridView_RowDataBound int no; // fetching from database if(no < 3) { e.Row.Cells[1].CssClass = "MyClass"; } Here problem is there that, If I am putting debug point then Its showing correctly. But if I am not putting any debug point and running application then its updating all row's cell format as per last Css. Dont know whats problem with it ?

      Thanks, Sun Rays To get something you must have to try once. My Articles

      I Offline
      I Offline
      Imran Khan Pathan
      wrote on last edited by
      #2

      Sun Rays wrote:

      e.Row.Cells[1].CssClass = "MyClass";

      try following code

      e.Row.Cells[1].Attributes.Add("CssClass","MyClass");

      bEst rEgard pAthan

      please don't forget to vote on the post that helped you.

      S 1 Reply Last reply
      0
      • I Imran Khan Pathan

        Sun Rays wrote:

        e.Row.Cells[1].CssClass = "MyClass";

        try following code

        e.Row.Cells[1].Attributes.Add("CssClass","MyClass");

        bEst rEgard pAthan

        please don't forget to vote on the post that helped you.

        S Offline
        S Offline
        Sun Rays
        wrote on last edited by
        #3

        Hi, I have done that also. Problem in debug point only. Issue is there only.

        Thanks, Sun Rays To get something you must have to try once. My Articles

        1 Reply Last reply
        0
        • S Sun Rays

          Hi friends, I am having one porblem to format cell's CssClass runtime. I have written below code in GridView_RowDataBound int no; // fetching from database if(no < 3) { e.Row.Cells[1].CssClass = "MyClass"; } Here problem is there that, If I am putting debug point then Its showing correctly. But if I am not putting any debug point and running application then its updating all row's cell format as per last Css. Dont know whats problem with it ?

          Thanks, Sun Rays To get something you must have to try once. My Articles

          N Offline
          N Offline
          N a v a n e e t h
          wrote on last edited by
          #4

          Sun Rays wrote:

          But if I am not putting any debug point and running application then its updating all row's cell format as per last Css

          Have you tried to break for all the items in GridView ? Is your code inside a try,catch block ? If yes comment it and check once.

          All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

          S 1 Reply Last reply
          0
          • N N a v a n e e t h

            Sun Rays wrote:

            But if I am not putting any debug point and running application then its updating all row's cell format as per last Css

            Have you tried to break for all the items in GridView ? Is your code inside a try,catch block ? If yes comment it and check once.

            All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

            S Offline
            S Offline
            Sun Rays
            wrote on last edited by
            #5

            Hi, ya I have checked with all possibilities. If I am debugging line by line my code then its not giving any error, And giving desired output. But if I am not putting any debug point then its not updating CSS.

            Thanks, Sun Rays To get something you must have to try once. My Articles

            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