Click here to Skip to main content
14,640,505 members
Home » Discussions » ASP.NET
   

ASP.NET

 
GeneralRe: change forecolor of a label in gridview Pin
laziale15-Mar-10 9:47
Memberlaziale15-Mar-10 9:47 
GeneralRe: change forecolor of a label in gridview Pin
Abhijit Jana15-Mar-10 10:02
professionalAbhijit Jana15-Mar-10 10:02 
GeneralRe: change forecolor of a label in gridview Pin
Sandeep Mewara15-Mar-10 10:11
mentorSandeep Mewara15-Mar-10 10:11 
GeneralRe: change forecolor of a label in gridview Pin
Abhijit Jana15-Mar-10 10:14
professionalAbhijit Jana15-Mar-10 10:14 
GeneralRe: change forecolor of a label in gridview Pin
laziale15-Mar-10 11:00
Memberlaziale15-Mar-10 11:00 
GeneralRe: change forecolor of a label in gridview Pin
Brij15-Mar-10 18:21
mentorBrij15-Mar-10 18:21 
GeneralRe: change forecolor of a label in gridview Pin
Abhijit Jana15-Mar-10 9:51
professionalAbhijit Jana15-Mar-10 9:51 
AnswerRe: change forecolor of a label in gridview Pin
Abhijit Jana15-Mar-10 10:01
professionalAbhijit Jana15-Mar-10 10:01 
Try with this :

You need to do this in RowDataBound Event of GridView.

void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
    if (e.Row.RowType == DataControlRowType.DataRow)
    {
     
      Label lblFirstName= (Label)e.Item.FindControl("lblFirstName");
       if(lblFirstName.Text == "MyText")
             lblFirstName.ForColor=mycolor;
  
    }
}
Cheers !
Abhijit
Codeproject MVP

GeneralRe: change forecolor of a label in gridview Pin
laziale15-Mar-10 11:06
Memberlaziale15-Mar-10 11:06 
GeneralRe: change forecolor of a label in gridview Pin
Abhijit Jana15-Mar-10 11:17
professionalAbhijit Jana15-Mar-10 11:17 
GeneralRe: change forecolor of a label in gridview Pin
laziale15-Mar-10 11:35
Memberlaziale15-Mar-10 11:35 
GeneralRe: change forecolor of a label in gridview Pin
FyreWyrm15-Mar-10 15:39
MemberFyreWyrm15-Mar-10 15:39 
GeneralRe: change forecolor of a label in gridview Pin
Brij15-Mar-10 18:27
mentorBrij15-Mar-10 18:27 
GeneralRe: change forecolor of a label in gridview Pin
laziale16-Mar-10 3:14
Memberlaziale16-Mar-10 3:14 
GeneralRe: change forecolor of a label in gridview Pin
Abhijit Jana16-Mar-10 3:30
professionalAbhijit Jana16-Mar-10 3:30 
GeneralRe: change forecolor of a label in gridview Pin
laziale16-Mar-10 3:59
Memberlaziale16-Mar-10 3:59 
AnswerRe: change forecolor of a label in gridview Pin
carlecomm15-Mar-10 16:35
Membercarlecomm15-Mar-10 16:35 
GeneralRe: change forecolor of a label in gridview Pin
laziale16-Mar-10 3:17
Memberlaziale16-Mar-10 3:17 
QuestionBulletedList control Pin
hotthoughtguy15-Mar-10 8:03
Memberhotthoughtguy15-Mar-10 8:03 
AnswerRe: BulletedList control Pin
Sandeep Mewara15-Mar-10 9:23
mentorSandeep Mewara15-Mar-10 9:23 
AnswerRe: BulletedList control Pin
Brij15-Mar-10 9:31
mentorBrij15-Mar-10 9:31 
GeneralRe: BulletedList control Pin
Abhijit Jana15-Mar-10 9:53
professionalAbhijit Jana15-Mar-10 9:53 
GeneralRe: BulletedList control Pin
Brij15-Mar-10 18:18
mentorBrij15-Mar-10 18:18 
GeneralRe: BulletedList control Pin
Abhijit Jana15-Mar-10 19:51
professionalAbhijit Jana15-Mar-10 19:51 
QuestionA generic error occurred in GDI+ on bitmap.save Pin
VinothRao15-Mar-10 4:49
MemberVinothRao15-Mar-10 4:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.