and null fields in a datagrid

T

Tina

in the itemDatabound event of a datagrid, both null fields and blank string
come through as   in the e.items.cells field. Is there anyway to tell
them apart?
Thanks,
T
 
S

S.M. Altaf [MVP]

Is there anything specific you're trying to accomplish by differentiating
between the two? Under general scenarios, they would both be the same in
the datagrid. But if you're looking to change the value in the datagrid
based upon these values, you should check the corresponding value in the
dataset, and not in the datagrid cell. You can access it in the
ItemDataBound event with something like

ds.Tables(0).Rows(e.Item.ItemIndex)

HTH

-Altaf [MVP]
 

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,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top