During which event can data in a TemplateColumn be changed?

P

Peter Larsson

Hi there,

I'm looking for a way to check and edit cell values in TemplateColumns in a
datagrid, after data has been bound. With a regular BoundColumn, I can use
the ItemDataBound event to check and edit cell values, but I cannot get it
to work with TemplateColumns. I am successful changing values in the
ItemDataBound event even for TemplateColumns, but if I try to retrieve the
cell value to determine if I need to edit it in some how, using e.g. "If
e.Item.Cells(3).Text = ...", I only get an empty string returned.

My question therefore is either what I'm doing wrong, or if this is the way
it's supposed to be? And is there another event that I can use to access the
values of TemplateColumn cells to validate and change data?

Thank you in advance!

Peter Larsson
 

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,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top