How can I put all data that are in a line in my GridView, in Bold style, if another column of this GridView has the value “1” for example ?
This columns, can’t be visible to the user.
I use SqlDataSource to fill my GridVIew
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could:
Use the GridView.RowDataBound event to inspect the data you’re
writing to each column (you’d check for the value “1”, in your case).
If your condition is met, set a flag.
Once the flag has been set, you can check it on writing each new row
(again, using the event detailed above). When writing the row you
want to appear as bold, check the flag. If the flag is set, change the CssClass
property of the Row object to a class you have created in your stylesheet, which has
text-weight:boldor similar.