Question on Datagrid

G

Goober

I have a list that's produced in a datagrid on a web page, that is ordered
by a 14 character field. The entire grid is displayed, no paging or
anything.

What I'd like to do with the datagrid is to make a different display between
the sections as that order by field changes.

For instance:

item1
item2
item3
then maybe either a change in the datagrid line, or a change in the color
scheme on the datagrid.
item 4
item 5
then another change in the datagrid line, etc.

Just a way to make the datagrid a little more readable to the user at first
glance.

Is there any relatively simple way to do this?

BC
 
S

Scott Mitchell [MVP]

Goober said:
What I'd like to do with the datagrid is to make a different display between
the sections as that order by field changes.

Goober, this FAQ shows how to display a DataGrid's data so that it is
grouped by category:
http://datawebcontrols.com/faqs/DataLists/GroupingByCategory.shtml

(Not exactly color-coded, as you specified, but see if the above link
isn't a feature you might want to add...)

--

Scott Mitchell
(e-mail address removed)
http://www.4GuysFromRolla.com

* When you think ASP.NET, think 4GuysFromRolla.com!
 
E

Eliyahu Goldin

In PreRender event loop through the grid rows and set new grid colors when
the field value changes.

Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top