473,468 Members | 1,358 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Display an underscore before the data in a column

I have a datagrid which pulls from a stored procedure. For the purpose
of this display issue, we need to prepend a bound column with a
underscore "_" We don't want to change the stored procedure. can I do
this in the property builder for the datagrid?

Nov 19 '05 #1
2 1191
this should take care of the underscore
<asp:BoundColumn DataField="fieldname"
DataFormatString="_{0}"></asp:BoundColumn>
"Antonio" wrote:
I have a datagrid which pulls from a stored procedure. For the purpose
of this display issue, we need to prepend a bound column with a
underscore "_" We don't want to change the stored procedure. can I do
this in the property builder for the datagrid?

Nov 19 '05 #2
You need to handle the Item_Databound Event for the datagrid. You will
be passed an EventArgs parameter that has an Item property that you can
cast to a DatagridItem object. From the DatagridItem you can reach
into its Cells property and pre-pend the "_" before the item in the
cell. You can get into the cells by doing something like this:

DataGridItem item = e.Item

item.Cells[2] <--------- represents a cell in the 3rd Column
This should give you a start.

Nov 19 '05 #3

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

Similar topics

1
by: hharry | last post by:
Hello All, DDL Statements: CREATE TABLE . ( (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ) ON GO
18
by: Alpha | last post by:
Hi, I'm working on a Windows applicaton with VS 2003 on windows 2000. I have a listbox that I have binded to a dataset table, "source" which has 3 columns. I would like to display 2 of those...
4
by: Jon Bosker | last post by:
Hi My data is held in XML. I have 2 tables one with some time entry data and the other with some project related data - here is the much simplified version: TimeEntries (table) - StartTime...
1
by: Kanon | last post by:
Hi, I hope this is the proper newsgroup for this kind of question. I have just started to learn about RSS and made my first feed: http://www.herbaloutfitters.com/pbw/alpha/rss/1-1.xml Some...
1
by: fareeda.tamboli | last post by:
hi.. I need to select records ordered by a string column. But when I order by with data containing an underscore, the result is not as expected. Following probably will make the problem...
1
by: John Phelan-Cummings | last post by:
When I add the name of a new individual in a, bound form, it will not display that person’s name in a label control of a second unbound form. I have a scheduling program that I am working on. ...
4
by: rszebras | last post by:
I inherited a database (as a novice at Access) and need to modify it to make it more efficient, i.e., the assignment form needs to autopopulate with the client's name, address, phone number, etc.,...
2
by: scott | last post by:
Is there a way to make the underscore Character display in a browser? I've tried several different fonts but the "_" character will not display.
6
by: MarwaAlSagheer | last post by:
I have data table with Two Columns (S_column,R_column) and I want to display these data at rich text box like this formate : (Red Color ) >>> it just Title Data of Column (Black Color ) ...
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
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
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,...
1
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...
0
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.