Problem in Runtime format cell
-
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
-
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
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.
-
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.
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
-
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
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
-
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
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