473,387 Members | 1,650 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,387 software developers and data experts.

DataGrid Sort Column HeaderStyle

Hi!,

I am using the following CSS class for the DataGrid Head column wherein i am
sorting the recrods. The style works fine.. By default it puts an underline
for each header column. The underlin should be there except for the sorted
column.

Can anyone help me out.

----
CSS Class :

...grdHeaderClass, grdHeaderClass td, .grdHeaderClass a, .grdHeaderClass
a:link, .grdHeaderClass a:visited, .grdHeaderClass a:hover
{ }
-----------
Thanks,
Baren
Nov 19 '05 #1
2 2290
Baren then apply the correct CSS:-
text-decoration: none
Hope it helps
patrick

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #2
On Thu, 28 Apr 2005 20:40:02 -0700 in
microsoft.public.dotnet.framework.aspnet, "Baren"
<Ba***@discussions.microsoft.com> wrote:
Hi!,

I am using the following CSS class for the DataGrid Head column wherein i am
sorting the recrods. The style works fine.. By default it puts an underline
for each header column. The underlin should be there except for the sorted
column.

Can anyone help me out.

----
CSS Class :

..grdHeaderClass, grdHeaderClass td, .grdHeaderClass a, .grdHeaderClass
a:link, .grdHeaderClass a:visited, .grdHeaderClass a:hover
{ }
-----------
Thanks,
Baren


One approach might be to add a style="text-decoration:none;" attribute
to the column header that is selected. The best way would to do this
would be to add a OnItemDataBound handler to your DataGrid. In this
method, check to see if the HeaderTemplate is being databound. If it
is, find the column that is currently the sort-order column and add
the css as above.

Let me know if you need more details, but that should get you started.

Roger
Nov 19 '05 #3

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

Similar topics

8
by: Ashish Shridharan | last post by:
Hi All I have been trying to add a control to the header cell of a datagrid on my ASP.NET page. These controls are defined in the HTML as ASP.NET web controls. They are being added into the...
1
by: Webgour | last post by:
Hi, I'm tring to add a column to a datagrid with a linkbutton as header that can be used to sort the column. The column and the linkbutton are added programmatically (see below). However the...
0
by: Robert Brinson | last post by:
Hello all! I'm running .NET Framework 1.1 using VS.NET 2003. I've got a mystery with a DataGrid. Below is the definition of the DataGrid from my aspx page: </asp:datagrid><asp:datagrid...
0
by: Mo | last post by:
Hi, I'm getting an error: Input string was not in a correct format This happens when I try to sort a column. It seems that the sort event handler claims that the sort expression is not in...
1
by: VB Programmer | last post by:
I have a datagrid which is bound to a datatable that I create on the fly. How do I set the width of each column via code? Ex: Column 1 is always 100, Column 2 is always 250, etc... Thanks!
1
by: Maziar Aflatoun | last post by:
Hi everyone, I have a DataGrid with sort functionality enabled so that users can sort each column by clicking on the column name. Can someone please tell me how I can add CSS to my headers? no...
2
by: saleek | last post by:
Hi, I am trying to figure out why my datagrid has stopped firing the page and sort commands. Scenario: I originally had template columns in my datagrid and had set up custom bi-directional...
5
by: Stephen | last post by:
Hi, Is there anyway I can make a column thats databound into a hyperlink to navigate to another page? Suppose I have 3 columns: SortOrder, Description, UserName for eg: <Columns>...
2
by: Charleees | last post by:
Hi all, I have a DataGrid with Template Columns..... There are LAbels,Linkbuttons in the Single Row.. I have to set the Constant Column width for those Template Columns in Grid... Wat...
0
by: rupalirane07 | last post by:
Both grids displays fine. But the problem is only parent datagrid sorting works fine but when i clik on child datagrid for sorting it gives me error: NullReferenceException error Any...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.