Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / March 2008

Tip: Looking for answers? Try searching our database.

GridView - how to fancy it up?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Keith G Hicks - 28 Feb 2008 15:14 GMT
Out of the box, the asp.net 2.0 GridView is very plain. Even the AutoFormats
for it are pretty basic. That is compared to what you can get with a 3rd
party tool like Developer Express or Telerik. I'm new to so much of this and
wondering if it's possible using skins/css, etc. (not sure what to ask
exactly) to make the native grid a lot fancier. I know I can change various
colors, borders, etc. using style settings but can I for example put images
in the grid's column headers? Can anyone point me to information explaining
how to make the grid a lot more attractive?

Thanks,

Keith
Cowboy (Gregory A. Beamer) - 28 Feb 2008 15:25 GMT
CSS is your best bet on spicing it up and what the AutoFormats use. If you
want even more spice, you will either have to "subclass" the GridView (make
your own) and add more umph, or go to a third party control.

I cannot envision much, in the way of looks, that CSS cannot handle.

Signature

Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************

| Think outside the box!

*************************************************
> Out of the box, the asp.net 2.0 GridView is very plain. Even the
> AutoFormats
[quoted text clipped - 13 lines]
>
> Keith
Keith G Hicks - 28 Feb 2008 15:46 GMT
With css could you for example make the headers "glass" or "metalic" and
include a custom glyph to show sort direction? I konw for that you need
image files but I am so new to this I don't know where to begin. I'd like to
try but I need some direction. Does anyone know of any samples I could look
at in order to get a better understanding of this? My impression so far is
that even with css, if the control doesn't have a property (such as
HeaderImageURL) then it cannot be done anyway. I'm sure I'm wrong, but
that's what my limited knowledge of this tells me. When you say that css is
what the AutoFormats use, I see that with something like Developer Express'
grid but when I apply an AutoFormat like "Colorful" to the native grid, I
don't see any new css files anywhere in my site's files.

> CSS is your best bet on spicing it up and what the AutoFormats use. If you
> want even more spice, you will either have to "subclass" the GridView (make
[quoted text clipped - 27 lines]
> >
> > Keith
Cowboy (Gregory A. Beamer) - 28 Feb 2008 16:39 GMT
Many of the things you see in other grids are simply CSS linked to images.
Quick example:

<HeaderStyle CssClass="Glass" />

And here is the style:

Glass {
background:url(images/glass.png) repeat;
}

I did the CSS on the fly, so I may have an issue with syntax, but it does
follow the basic idea.

Play with CSS and get the look you desire, then add that class to your
header.

Signature

Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************

| Think outside the box!

*************************************************
> With css could you for example make the headers "glass" or "metalic" and
> include a custom glyph to show sort direction? I konw for that you need
[quoted text clipped - 47 lines]
>> >
>> > Keith
Kelly Herald - 28 Feb 2008 17:29 GMT
For the GridView sort image you can use this:

ASP.NET GridView Sort Indicator Component by Urs Enzler.
http://www.cscoding.com/article/6/6284.html

> With css could you for example make the headers "glass" or "metalic" and
> include a custom glyph to show sort direction? I konw for that you need
[quoted text clipped - 47 lines]
>> >
>> > Keith
James - 03 Mar 2008 03:07 GMT
Hi Keith,
Here are some examples and some descent websites for help:

http://www.asp.net/learn/videos/
http://www.codeproject.com/KB/aspnet/SkinSample.aspx
http://forums.asp.net/t/1184845.aspx
http://msdn2.microsoft.com/en-us/library/aa479339.aspx
http://msdn2.microsoft.com/en-us/library/aa479350.aspx

> Out of the box, the asp.net 2.0 GridView is very plain. Even the
> AutoFormats
[quoted text clipped - 13 lines]
>
> Keith

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.