473,672 Members | 2,568 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Enable Gridview Sorting But Avoid Underline Of Column Name

6 New Member
Hi EveryOne
I have a gridview with sorting enabled. As we all know, when sorting is enabled in a gridview, the column names in the gridview get UNDERLINED permanently. I dont want this. i want the column name to be underlined on mouseover.
how can i do this. Plz help.
Rahul
Mar 19 '08 #1
2 5502
nateraaaa
663 Recognized Expert Contributor
You should be able to apply a css style to the HeaderText of your gridview.

You will need the following in your css.

Expand|Select|Wrap|Line Numbers
  1.  a {text-decoration: none} 
  2. a:hover {text-decoration: underline}
  3.  
Nathan
Mar 19 '08 #2
Frinavale
9,735 Recognized Expert Moderator Expert
You should be able to apply a css style to the HeaderText of your gridview.

You will need the following in your css.

Expand|Select|Wrap|Line Numbers
  1.  a {text-decoration: none} 
  2. a:hover {text-decoration: underline}
  3.  
Nathan
Although using CSS is the best way to handle this, if you don't have any CSS set up for your headers, you could add simply a <HeaderStyle> tag and set the underline to false.

Expand|Select|Wrap|Line Numbers
  1. <asp:GridView ....>
  2.      <asp:BoundField ...>
  3.           <HeaderStyle Font-Underline="False" />
  4.       </asp:BoundField>
  5. ....
  6. </asp:GridView>
  7.  
-Frinny
Mar 19 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
3858
by: John_H | last post by:
Re: ASP.NET 2.0 I would like suggestions or code examples on how to collect a variable length list of input data (item# & item quantity specifically). I thought that I could accomplish this using a GridView that has ViewState enabled, an ObjectDataSource to process the submitted list, textboxes for getting new item data and an add button. Does this approach sound feasible or are there better alternatives? My problem is that I don't...
0
2283
by: Aws | last post by:
My crazy GridView !! I am using Visual Studio 2005, I have a problem with my GridView. I have one access .mdb table and when I update a record on the table EVERYTHING is perfect. I made a Web Setup Project and installed My Web Application on my Localhost and it works perfectly. When I install My Web Application on our “Production Server” it just doesn’t update the records on Edit mode!!!
1
2277
by: James Rosewell | last post by:
I'm getting an error in the following scenario. - A GridView control is bound to an SQLDataSource. - The user selects a column for sorting. - Some time later in code the column used for sorting is removed and the SelectCommand SQL changed so that the field is not returned. - When the GridView is redisplayed an error occurs because the GridView.SortExpression is no longer a valid column. The SortExpression property of the GridView...
1
3537
by: Eric | last post by:
I have a GridView control that I want to sort on multiple columns when I click a particular column. For example, I display Last name + ", " + First name in the first column and display id in the second column. When clicking on the first column, I want the GridView to sort on LastName and FirstName. Based on Microsoft's documentation of SortExpression property, all I have to do is to set SortExpression=LastName,FirstName on the first column....
1
380
by: Nate | last post by:
I have a GridView with one sort column. When I click the sort column the first time nothing happens. After that when I click the sort column the sort order changes and my grid is updated as expected. I am only having an issue the first time I click on the sort column. I have read about manually handling the sorting behavior but it seems to work just fine after the first attempt without any manual code added. I was hoping that there is a way...
1
3523
by: jmdolinger | last post by:
Hi all, I'm a newbie to Atlas (and recently ASP.NET) after coming from a long Java background, also have done quite a bit with an Ajax.NET/ASP.NET 1.1 project, but it was basically all javascript, nothing really having to do with ASP.NET... I'm attempting to put together an application that consists of several GridView controls each bound to some xml data. Each table exists in its own update panel. The two effects I'm going for are:
4
8243
by: samb | last post by:
When I use manual databinding to a GridView control, as bellow. 'Retrive a DataSet from database Dim ds As DataSet = uda.GetUsers(conectionString) 'gvUsers - The GridView gvUsers.DataSource = ds gvUsers.DataBind()
5
5970
by: Cindy Lee | last post by:
I'm getting my data from an XML file. The data binds fine, but I can't sort on it. Do I have to do anything special? I have enabled sorting on my grid view. Autogenerate columns is off, and I use bound fields. The sort expression is just the same datafield that binds the column, but when I try to sort with the post back, nothing works.
2
3340
by: Aamir Ghanchi | last post by:
hi, I have a gridview which is bound to ObjectDataSource which in turn reads from a business objects methods for custom paged data. When PageIndex is set to any value other than 0 and one of the column headers is clicked for sorting, the pageindex gets reset to 0. I tried to debug it . the PageIndex property of gridview stays the same in the Sorting event of gridview, but I see it changes to 0 in the Selecting event of the...
0
8486
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8931
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8680
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7446
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6238
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5705
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4418
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2819
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1816
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.