Printing Hex in a Grid Control

P

Paul Hastings

Hi All -

I have a dataset that has a combination of string data and byte data that I
want to print out in a grid.

Everything works fine in terms of retrieving the dataset but I cant figure
out how to print the darn thing out. I keep getting "System.Byte[]" in the
columns that have Byte data. The Grid control allows a Data Formatting
Expression but nothing I try seems to work.

My output grid looks (something) like this:

SERIAL_NUMBER TYPE PROGRAM_DATE
------------------------------------------

123456 System.Byte[] System.Byte[]

678901 System.Byte[] System.Byte[]

949349 System.Byte[] System.Byte[]


I have tried {0:2X} and {0:4x} for the formatting expression in the TYPE and
PROGRAM_DATE columns but nothing seems to work. I have tried lots of other
combinations too, but it keeps printing out "System.Byte[]"

I want to print out the bytes in Hex format like "0x1F" or maybe "0x1F2B"

Is there a way to do this with the Formatting Expression?

Thanks,

Paul Hastings
 

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

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
DewittMill
Top