473,326 Members | 2,111 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,326 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 2281
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.