In your example HighlightedCell refers to a rule with matching name defined
somewhere in the style sheets available for the page. If you don't have, you
won't see any effect. That is what you are observing.
There are plenty online resources on stylesheets, search for them and read
what is appropriate for your desired level of understanding.
Attributes collection allows you to set any attributes for the control.
Attribute "class" is reserved for linking the control to a stylesheet rule
with matching name.
Eliyahu
"serge calderara" <se************@discussions.microsoft.com> wrote in
message news:A4**********************************@microsof t.com...
Thats maybe what ^have not understand
What do you mean by class rule ?
I did not check any style sheet ..:-(
It is linked to style sheet ?
Do you have a good link or document which explain all of that ?
How the Attributes and style sheet get links togeteher
serge
"Eliyahu Goldin" wrote:
The example looks fine. Check if you have a .HighlightedClass rule
somewhere
in your style sheets.
Eliyahu
"serge calderara" <se************@discussions.microsoft.com> wrote in
message news:7B**********************************@microsof t.com... > Dear all,
>
> I ma preparing for my AS.NEt exam and I am trying to understand how to
> use
> the
>
> e.Cell.Attributes.Add within a datagrid.ItemDatabound event
>
> I have an example where code is as follow:
> e.Cell.Attributes.Add("class","HighlightedCell")
>
> Could not see any effect....
>
> Thnaks for your help
> regards
> serge