473,511 Members | 16,282 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

c# DataGrid, Change value from dataset

77 New Member
Hi, me again (lol)

I searched for this but i dont quite know what im looking for. Someone has already suggested the load event but i cant find a load event for the data grid.

The problem is my database has ID numbers for the type rather than displaying a text representation. Now when printing a report i know that i will need to convert these values to there text so its readable to the user.

However, when displaying the database (using a sql data adapter) in the datagrid im not quite sure hot to change that int to a string representation.

So something like:
1 = email
2 = Fax
3 = phone

etc.etc. Anyhelp on what im looking for is much appreciated. Im going to keep searching google in the mean time :)


Regards,
Piercy
Jan 16 '08 #1
1 4205
piercy
77 New Member
Hi, me again (lol)

I searched for this but i dont quite know what im looking for. Someone has already suggested the load event but i cant find a load event for the data grid.

The problem is my database has ID numbers for the type rather than displaying a text representation. Now when printing a report i know that i will need to convert these values to there text so its readable to the user.

However, when displaying the database (using a sql data adapter) in the datagrid im not quite sure hot to change that int to a string representation.

So something like:
1 = email
2 = Fax
3 = phone

etc.etc. Anyhelp on what im looking for is much appreciated. Im going to keep searching google in the mean time :)


Regards,
Piercy


Just to let anyone who also has this problem know... i solved it using SQL INNER JOIN fucntion

take a look on w3schools.com for info on it.. great site for SQL IMO
Jan 23 '08 #2

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

Similar topics

8
1303
by: pcPirate | last post by:
Hi, I've followed some advice through this forum in which I would change the dataset value in order to change the particular cell value in datagrid via coding. What I'm doing now is that, if I...
1
9486
by: xrow | last post by:
Hello I have a simple webservice / c# application that receives data from server and prints the data in the asp:datagrid control I have problem when sorting data in datagrid I have created...
1
15731
by: Amadelle | last post by:
Hi all and thanks in advance for your help, I have a problem with capturing the changed value of a text box in a datagrid. The datagrid is populated based on a dataset and I am using template...
0
1383
by: TK | last post by:
Hi, I need help on datagrid. I have a dataset exposed as a webservice. I do have a web application that is supposed to consume the service on a datagrid.
3
1646
by: ALPO | last post by:
We have a datagrid built using template columns. Many are text boxes. These text boxes are bound to a datasource as follows: <ItemTemplate> <asp:TextBox id="txtPeriod1" runat="server"...
1
1855
by: Amadelle | last post by:
Hi all and thanks in advance for your help, I have a problem with capturing the changed value of a text box in a datagrid. The datagrid is populated based on a dataset and I am using template...
5
2013
by: junglist | last post by:
Hi guys, I've been trying to implement an editable datagrid and i have been succesful up to the point where i can update my datagrid row by row. However what used to happen was that once i updated...
1
4214
by: sianan | last post by:
I tried to use the following example, to add a checkbox column to a DataGrid in an ASP.NET application: http://www.codeproject.com/aspnet/datagridcheckbox.asp For some reason, I simply CAN'T get...
5
5887
by: Genojoe | last post by:
I am using code from Help with two exceptions. (1) I increased the number of sample rows from 3 to 20, and (2) I anchored the datagrid to bottom of form so that I can change the size of the grid by...
9
2708
by: rn5a | last post by:
A Form has a DataGrid which displays records from a SQL Server 2005 DB table. Users can modify the records using this DataGrid for which I am using EditCommandColumn in the DataGrid. This is the...
0
7144
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...
0
7356
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,...
0
7427
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...
1
7085
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
5671
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
5069
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
4741
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
3214
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
785
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.