Datagrid - changing displayed data in a column 
Author Message
 Datagrid - changing displayed data in a column

Hi there, I wonder if you can help.  I've searched for info on this,
but have been unsucessful.

I have a datagrid displaying columns from a ADO recordset.  One of the
columns displays a code - A, B, C or D.  I would like the datagrid to
display a different name - for instance, if A display Apples, B
display Books, C display Chair ... etc.

Is there an easy way to handle this without creating another table ?

Thanks in advance,

Paul.



Tue, 23 Sep 2003 03:36:44 GMT  
 Datagrid - changing displayed data in a column
Try:

DataGrid.Columns("A").Caption = "Apples"

Dennis



Quote:
> Hi there, I wonder if you can help.  I've searched for info on this,
> but have been unsucessful.

> I have a datagrid displaying columns from a ADO recordset.  One of the
> columns displays a code - A, B, C or D.  I would like the datagrid to
> display a different name - for instance, if A display Apples, B
> display Books, C display Chair ... etc.

> Is there an easy way to handle this without creating another table ?

> Thanks in advance,

> Paul.



Tue, 23 Sep 2003 14:41:06 GMT  
 Datagrid - changing displayed data in a column


Quote:
>Try:

>DataGrid.Columns("A").Caption = "Apples"

>Dennis



>> Hi there, I wonder if you can help.  I've searched for info on this,
>> but have been unsucessful.

>> I have a datagrid displaying columns from a ADO recordset.  One of the
>> columns displays a code - A, B, C or D.  I would like the datagrid to
>> display a different name - for instance, if A display Apples, B
>> display Books, C display Chair ... etc.

Thankyou for your reply, I dont think I made my description clear
enough.  It's not the column header that I'm trying to change, it's
the contents of the cells for a specific column.  If the contents of
the field database.field3 = "A" then display "Apples" in the cell.  

Paul



Tue, 23 Sep 2003 16:08:04 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Display the first Field column that the System Stored procedure calls to display in my Datagrid

2. Display the first Field column that the System Stored procedure calls to display in my Datagrid

3. Set order for columns displayed in a datagrid control

4. Datagrid column - how to set display format?

5. datagrid column removal - either exception thrown or no diffierence in display

6. Datagrid *refuses* to display date column correctly.

7. Display DataTextField of DataGrid column in proper case?

8. displaying RTF in DataGrid Column

9. DataGrid: Displaying boolean columns as checkboxes or strings

10. DataGrid: Displaying boolean columns as checkboxes or strings

11. DataGrid: Displaying boolean columns as checkboxes or strings

12. Changing datagrid column sizes dynamically

 

 
Powered by phpBB® Forum Software