Presentation of Data in the DataGrid

J

Johnny Cash

I have what I believe is a basic question about presentation of data
in a DataGrid.

My DataGrid is backed by a DataTable that has a number of key values,
for example, the number 1 in the country column might represent
Australia. However, I want to go against a "look up" table to actually
present "Australia" rather than 1. Is there a best practice for
something like this. I am hoping that it is integrated with Visual
Studio but I can't seem to find the best way to do it. Is this
something that must be hand coded?

Your advice is greatly appreciated!
Thanks,
AR.
 
A

Alvin Bruney [MVP]

one approach which avoids a database lookup and a table search is to bring
back the discription in another column and keep that column hidden
e.item.cells[0].visible = false for example. when you want to lookup 1 which
is in cell one you have merely to write out the value e.item.cells[0].text
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top