I have a label control that has the value
123| value9| value6|value9
Right below this label control, I have a gridview, I want to make that item of the gridview bold that has the linkbutton with
123 value in it
so for e.g
value9 Value1 Value3 Value4
345 Tested Value Equipment1 Equipment3
456 Testing Equipment9 Equipment9
123 Value9 Valu6 value9
789 Value8 Value10 value20
900 value5 value3 value34
all the value in value9 is a linkbutton. I want the whole line to be bold 123 Value9 Valu6 value9 when the label control has 123 in it and if the label control has 789 in it then I want the 789 Value8 Value10 value20 to be bold.
any help will be appreciated.
Have a look at the RowDataBound event.
Use the GridViewRowEventArgs object, to get a reference to the current
Rowand set itsFont.Boldto trueYou also need to include your if-condition into the RowDataBound event. How you do that depends on your datasource:
I’ve once written an article about the RowDataBound event: http://www.tomot.de/en-us/article/7/asp.net/gridview-overview-of-different-ways-to-bind-data-to-columns