Formatting data in a DataGrid 
Author Message
 Formatting data in a DataGrid

Hi,

My table has a column carType that can get two values B or T.

In the DataGrid (Windows form) the B should be display as BUS

The T should be display as TRUCK.

Both are populated in a ComboBox, while Im adding a new row The BUS/
TRUCK should be appearing. Before commit, the data should be translated to
the databese format.

Any ideas/examples are welcomed
thanks,
Yoel



Sun, 22 May 2005 22:31:13 GMT  
 Formatting data in a DataGrid

Quote:
> My table has a column carType that can get two values "B" or "T".

> In the DataGrid (Windows form) the "B" should be display as "BUS"

> The "T" should be display as "TRUCK".

> Both are populated in a ComboBox, while I'm adding a new row The "BUS"/"
> TRUCK" should be appearing. Before commit, the data should be translated
to
> the databese format.

Subclass a new column style, using one combox box per column. In the Paint
override, translate as needed.

--
Mickey Williams
Author, "Microsoft Visual C# .NET", Microsoft Press



Mon, 23 May 2005 00:58:23 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Format datagrid cell according to data within it.

2. Changing .MAT data format to binary format

3. Data Grid, Windows forms, Time Data Formatting

4. Formatting a DataGrid at runtime

5. DataGrid, HyperLink Column, URL Format String

6. Grrr... Conditionally formatting a DataGrid (not ASP)

7. String Formatting in Datagrids

8. Formatting DataGrid columns

9. Exporting A DATAGRID to .XLS FORMAT

10. Formatting a String in a DataGrid Column

11. format font of individual cell in Datagrid

12. Format Date in DataGrid?

 

 
Powered by phpBB® Forum Software