ASP.NET - how to avoid Alternate row style color for hiddenfield in dynamic tble  ASP.NET - how to avoid Alternate row style color for hiddenfield in dynamic tble

Asked By deepi singh
26-Oct-10 12:09 PM

This is my code.iam providing alternate row style color in dynamic table.In this i want to avoid Alternate row style color for hiddenfield

  

 

Dim itemCount As Integer

  

 

For itemCount = 0 To Icount - 1New TableRow

If (itemCount Mod 2 = 1) Then

tblRow(itemCount).BackColor = Drawing.Color.LightBlue-----------------------------------applying alternating colors for rows in dynamic table.

End If

  

 

'----this is for Qty * textbox---------

tblCol(1) = New TableCell

txtQty(itemCount) = New  TextBox

txtQty(itemCount).ID = "txtQty" & itemCount

txtQty(itemCount).Width = "40"

txtQty(itemCount).Text = "0"

tblCol(1).Controls.Add(txtQty(itemCount))

tblRow(itemCount).Cells.Add(tblCol(1))

tblOrderLineItem.Rows.Add(tblRow(itemCount))

 

tblCol(2) = New TableCell
 hdnSdate(itemCount) =New HiddenField
 hdnSdate(itemCount).ID = "hdnSdateID" & itemCount
 tblCol(2).Controls.Add(hdnSdate(itemCount))
 tblRow(itemCount).Cells.Add(tblCol(2))
 tblOrderLineItem.Rows.Add(tblRow(itemCount))

next

when iam applying row style color for dynamic table....iam getting color to hiddenfield row also how to avoid color for hiddenfields?

tblRow(itemCount).BackColor = Drawing.Color.LightBlue------this code applying alternate color to whole table
row .......but i dont to apply for hiddenfield?

  undhad ashwin replied to deepi singh
26-Oct-10 12:23 PM
Hidden means u r fields not display means u can't find object or Fields.

so how can u set.

any question then replay
  deepi singh replied to undhad ashwin
26-Oct-10 12:40 PM
Hi,

See iam applying alternate row style color in dynamic table....using this code

tblRow(itemCount).BackColor = Drawing.Color.LightBlue

by this code iam getting color to hidden field cell also even it is in hidden.........tht means whole row getting color...............i want to avoid color for hidden field cell....


  anil soni replied to deepi singh
26-Oct-10 02:23 PM
But the hidden fileds are never rendered, so how you have checked that it is getting displayed with a particular color???
Create New Account
help
Gridview Edit, Update and Delete Hi as am new to ASP.NET i need some help in reviewing the code and find out the problem I have BackColor = "White" / > <Columns> <asp:TemplateField HeaderText = "ClientID" SortExpression = "ClientID"> <ItemTemplate> <%# Eval("ClientID") %> < / ItemTemplate> <EditItemTemplate> <asp:TextBox ID = "TextBox1" runat = "server" Text = '<%# Eval("ClientID") %> ' ReadOnly = "true"> < / asp:TextBox> < / EditItemTemplate> <FooterTemplate> <asp:TextBox ID = "newTextBox1" runat = "server"> < / asp:TextBox> < / FooterTemplate> < / asp:TemplateField> <asp:TemplateField HeaderText = "Salutation" SortExpression = "Salutation"> <ItemTemplate> <%# Eval("Salutation") %> < / ItemTemplate> <EditItemTemplate> <asp TextBox ID = "TextBox2" runat = "server" Text = '<%# Eval("Salutation") %> '> < / asp:TextBox> < / EditItemTemplate> <FooterTemplate> <asp:TextBox ID = "newTextBox2" runat = "server"> < / asp:TextBox> < / FooterTemplate> < / asp:TemplateField> <asp:TemplateField
Help me. . . . . . hi all, i just want to say that actually i am new to asp.net 2.0 i have a work over my head and really m not knowing how ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] I have one Login Form which contains useriD(textbox), password(textbox), role(in role we have two type of Employees one is User and other reporting dropdown control is used and login button and one employee Profile Form which contains EmpID(textbox), Empname(textbox), MysiteURL(textBox), Reporting officer(textbox), E-mail(textbox) and Resume(file upload control) and edit button is used EmployeeView Form
Net hi friends Any one send frequently asked Important questions in C# .Net, ADO .Net, Asp .Net and Sql Server. . . . . . . . tx in Advance. . . . . . Hi, Find this. . (B)What is an IL? (B A) What is scavenging? (B) What are different types of caching using cache object of ASP.NET? (B) How can you cache different version of same page using ASP.NET cache object? (A) How will implement Page Fragment Caching? (B) Can you compare ASP.NET sessions with classic ASP? (B) Which are the various modes of storing ASP.NET session
in Sql server as var_name int How do you separate business logic while creating an ASP.NET application? There are two level of asp.net debugging 1. Page level debugging For this we have to edit the page level debugging The control itself will take care of the date display How can you deploy an asp.net application ? You can deploy an ASP.NET Web application using any one of the following three deployment options. a) Deployment using VS
Migration from ASP to ASP.net How to convert ASP site to ASP.NET site using C# http: / / www.asp.net / downloads / archived-v11 / migration-assistants / asp-to-aspnet hi, ASP.NET framework is very much different from unstrucured ASP and there is no correct way to