473,396 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Help on Cell.Attributes ?

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
Nov 19 '05 #1
4 1429
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

Nov 19 '05 #2
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


Nov 19 '05 #3
Use "view source" to see the generated HTML code. The cell (that is a "td"
tag) should have a class attribute now...

--

"serge calderara" <se************@discussions.microsoft.com> a écrit dans le
message de 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

Nov 19 '05 #4
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


Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Brian Alexander | last post by:
Hello; I am trying to determine all of the cell attributes active on a given cell of a curses window. I start by getting a value that contains the attribute and character at the specified...
16
by: Terry | last post by:
Hi, This is a newbie's question. I want to preload 4 images and only when all 4 images has been loaded into browser's cache, I want to start a slideshow() function. If images are not completed...
4
by: simon | last post by:
which data control allows me to use a cell doubleClick event? I have time cells (something like Outlook calendar) and when user double click on one cell I would like to redirect to other window...
2
by: Daniel Walzenbach | last post by:
Hi, I created an ASP.NET Datagrid where a single row can be selected by clicking anywhere on the row (according to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.