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

Editing in GridViews (formatting!)

I've got the Gridview going at full speed, and I've enabled editing,
but when I click on the "edit" button, this ugly editing UI comes up.
Well it's not ugly, but it's not great either.

How do I change the font/font size of the text thats being edited?

Thanks in advance,
Amit

Sep 20 '06 #1
1 1857
Hello Amit,

Option #1 - Use the IDE Tools to Modify the EditItemTemplates

The easiest way is to edit the template for your GridView Control.

1. First off, convert your bound columns to template columns.

Edit Columns select your field 'Convert this field into a TemplateField'.

2. Then, on the context [>] menu, click Edit Templates and select the EditItemTemplate
of the column you wish to modify.

From here, you can modify the control (replace text boxes with drop downs,
etc) and the font/formatting of the edit boxes.

Option #2 - Hand coding. :D

You can also hand-type the entries that are generated by the IDE in #1.
They look like below. Notice that I expanded the text box to a fixed size
and applied font formating (the EditItemTemplate), but left the ItemTemplate
alone so the "grid look" remains.

<asp:TemplateField HeaderText="subject_text" SortExpression="subject_text">

<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Font-Bold="True" Font-Names="Bell
MT" Height="47px"
Rows="5" Text='<%# Bind("subject_text") %>' Width="244px"></asp:TextBox>
</EditItemTemplate>

<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("subject_text")
%>'></asp:Label>
</ItemTemplate>

</asp:TemplateField>

Option #3 - Overall formatting on the GridView

In the <asp:GridViewtag, you can add an <EditRowStyletag that applies
formatting and/or CSS to the general "edit row".

Hope this helps!

-David

---
David R. Longnecker
Web Developer

Wichita Public Schools, USD 259

Amit Wrote:
I've got the Gridview going at full speed, and I've enabled editing,
but when I click on the "edit" button, this ugly editing UI comes up.
Well it's not ugly, but it's not great either.

How do I change the font/font size of the text thats being edited?

Thanks in advance,
Amit

Sep 21 '06 #2

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

Similar topics

4
by: Dan Weeb | last post by:
Hi All, I have struggled through this far with help from many of you so thanks. I am stuck again. I am really new to this so don't be harsh :-) There are a few problems. You can run the script...
1
by: magic | last post by:
Hello. I'm developing an application using MFC - VC++ 6.0 I'm wondering if there is an ActiveX control or other component that would make possible to make simple editing and formatting MS...
0
by: kk | last post by:
..NET Winforms Control for Spell and grammar check with formatting capabilitie ------------------------------------------------------------------------------------------- Need a control which has...
4
by: Nalaka | last post by:
Hi, I have two questions about gridViews. 1. How can I intercept the row/column values at loading to change values? 2. After I update a row (using default update functionality), how can I...
25
by: mdh | last post by:
Hi Group, Not looking for an answer, but more of an explanation. Thinking back to those heady days when you had the time to do them, may I ask this. Exercise 1-22 asks for a program to "fold"...
0
by: bigbrorpi | last post by:
Hi Is it possible to set global number formatting for an application? I need to have all numbers displayed with thousands separators and that's not currently the case. My desktop location...
0
by: HP | last post by:
Hi there I have a datalist control with some bound controls in its Item Template and a gridview bound to one of those fields (residing also in Item Template). I've found out that when I click...
0
by: titia111 | last post by:
I am new to 2.0 and am using nested gridviews. The first one contains category information, the second is based on a query from a product table. The data is pulling correctly, but the problem is...
0
by: titia111 | last post by:
This is my second post. Can anyone help? I am using nested gridviews, and they are pulling the data correctly but I am having difficulty formatting the results. I need to insert a line break...
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: 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
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: 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
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
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 project—planning, coding, testing,...
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.