Datagrid automatically trimming the cells

A

Alex D.

Hi. Does any body knows why databinding a datagrid with "Create columns
automatically at run time" option selected it shows my cells trimmed?? For
example if cell [0,0] was "0001" it shows only "1" ?

Thanks!
aLeX.
 
G

Guest

I suspect that it will be somthing to do with your data types, if it is a
number data type then it will likely get trimmed because it doesn't matter
how many 0s you precede a number with it is still 1. If it was a text field
then it should output what is in the field.
 
A

Alex D.

the solution is to add this to the cell's style: mso-number-format:\\@
this way it will be a text instead of a number what will be passed to Excel.

clickon said:
I suspect that it will be somthing to do with your data types, if it is a
number data type then it will likely get trimmed because it doesn't matter
how many 0s you precede a number with it is still 1. If it was a text
field
then it should output what is in the field.

Alex D. said:
Hi. Does any body knows why databinding a datagrid with "Create columns
automatically at run time" option selected it shows my cells trimmed??
For
example if cell [0,0] was "0001" it shows only "1" ?

Thanks!
aLeX.
 

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
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top