template column

M

masoud bayan

I wanted to add template columns to a datagrid at run time to show some text
boxes on grid.
As I do not know how many columns I have at design time I must create these
columns dynamically. I did it by inheriting a class from ITemplate interface
and assigning it to itemtemplate property of datagrid columns. Everything
seems fine and now I have a datagrid with variable columns and each cell is
a text box, but the problem is after post back I loose these columns and can
not read entered values in textboxes? after postback number of datagrid
columns is same as number design time columns so I loose add columns and
their values.
Is there any way that I can have access to these columns and textboxes?
 

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,995
Messages
2,570,225
Members
46,815
Latest member
treekmostly22

Latest Threads

Top