473,385 Members | 1,356 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,385 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 2288
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.