473,408 Members | 2,442 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,408 software developers and data experts.

gridview: RowEditStyle being ignored

BeemerBiker
I am using veranda and x-small fonts everywhere. I even specified that font in "edit row style" and when that didnt work, anywhere I found an empty style. However, it is being ignored and a textbox appears that is too big and the font fits exactly in the text box which makes it too big also. The box is too wide also, even though I specified the width in <item style>

All of my template columns are fine in edit or item mode. Just that single
bound field that is read-write and not a templete. I assume at RowCommand I can lookup the (textbox) control and set the font size but that seems a kluge. I could also change the field to a templete but that is a pain.

before edit:


after edit:

Mar 10 '09 #1
4 2090
shweta123
692 Expert 512MB
Hi,

You can use css class for the gridview.
Please refer the following example :
e.g.

Expand|Select|Wrap|Line Numbers
  1. <html >
  2. <head id="Head1" runat="server">
  3.     <title>GridView Summary</title>
  4.     <style type="text/css">
  5.         TABLE.tabulardata {
  6.             BACKGROUND-COLOR: #74aefa;
  7.         }
  8.         TABLE.tabulardata TR {
  9.             BACKGROUND-COLOR: white;
  10.         }
  11.         TABLE.tabulardata TH {
  12.             BACKGROUND-COLOR: blue;
  13.             PADDING:4px;
  14.         }
  15.         TABLE.tabulardata TD {
  16.             PADDING:4px;
  17.         }
  18.     </style>
  19. </head>
  20. <body>
  21.     <form id="form1" runat="server">
  22.     <div>
  23.         <asp:GridView runat="server" ID="gridView" 
  24.                       CSSClass="tabulardata" CellSpacing="1" 
  25.                       GridLines="None"/>
  26.     </div>
  27.     </form>
  28. </body>
  29. </html>
Mar 10 '09 #2
I am already using
Expand|Select|Wrap|Line Numbers
  1. .fixedtable
  2. {
  3.     table-layout: fixed;
  4.     margin-top: 0px;
  5.     left:0px;
  6.     width:99%; 
  7.     font-family:Verdana;
  8.     font-size:x-small;
  9.     border-style:none;
  10.     white-space:normal;
  11.     text-align:left;
  12. }
  13.  
I went and added
.fixedtable TD, .fixedtable TH, .fixedtable TD
to the above .fixedtable but nothing happened.
Mar 10 '09 #3
Frinavale
9,735 Expert Mod 8TB
It seems as if your edit template style is not being set correctly....except that you mention that the text box is not in the edit template? It's just a bound TextBox?


What are you doing to apply a style to it?
Mar 10 '09 #4
@Frinavale
Yea, but actually it is just whatever microsoft uses to edit a text field when you have boundtext and enable that builtin "edit" button. I need to switch to a templete as I have more control over formatting.

What are you doing to apply a style to it?
I am doing less than 0. I just discovered that the name of my stylesheet is case sensitive and it was not even being used when I thought it was. Once I get my stylesheet cleaned up maybe that edit will work. Right now my grids are all screwed up because they are finally getting access to the correct stylesheet.css and all the fixes I put in to correct for problems need to be removed as they have made things worse.

What is strange is that intellisense listed the styles in "StyleSheet.css" but they were not actually used until I changed to href="Stylesheet.css" which was the correct case-sensitive name.
Mar 10 '09 #5

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

Similar topics

1
by: Gerhard Pretorius | last post by:
I am reposting this..hoping someone (from Microsoft) can confirm this at least as a problem: Since installing the VS.NET August CTP the DataFormatString of the BoundField in the Gridview and...
6
by: Nalaka | last post by:
Hi, I have a gridView (grid1), which as a templateColumn. In the template column, I have put in a gridView (grid2) and a ObjectDataSource (objectDataSource2). Question is... How to I pass the...
0
by: Faybert | last post by:
Hello, and Thanks in advance for any light you might shed on my troubles. I'm trying to setup a series of checkboxes, or a checkboxlist to control the results that are shown on a gridview...
5
by: Dick | last post by:
I have a GridView bound to an ObjectDataSource. I have a Button that calls GridView.DataBind. I want the row that is selected before the DataBind to still be selected afterwards. This happens...
4
by: Richard Carpenter | last post by:
I have a simple gridview control contained in a panel in a web user control. One of the columns in the gridview is of type SQLDateTime. I would like to strip off the time portion of the DateTime...
2
by: Philip | last post by:
I can use a GridView and ObjectDataSource to bind my data using "Eval" expressions ... provided the GridView and related Column TemplateFields are defined as inline HTML. I prefer to...
0
by: Rick | last post by:
I have an uncomplicated GridView control bound to a SQLDataSource control which hits a test SQL db that I have running locally. Upon executing a series of UPDATEs in the GridView I am seeing...
1
by: news.microsoft.com | last post by:
I have been working some on a gridview to incorporate the ability to edit data for a row. I set up TemplateFields with EditItemTemplates to incorporate the text box controls I want for editing, but...
4
by: GaryDean | last post by:
I have an objectdatasource reading a dataset and I have a gridview using that objectdatasource (at design time). It binds fine but I need to clear it. myGridView.DataSource = null:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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...

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.