DataGrid question

G

Guest

hello friends,

i have a question about datagrid,
i have binded a datagrid with a datatable from values that came from a comma
seperated values (.CSV) file

i have created textboxes in all datagrid cells on the ItemDataBound event
and put text from each cell to the new text box in that cell,
until this point every thing is OK,
that client can see all values reside in these text boxes in the datagrid
and he can edit them,
but the problem is like this ;
i have an update button and in its event i am iterating throuhg all datagrid
items and for each cell in the datagrid i want to get back the value from the
text box in it,

but i cant find a text box in the cell.Controls,
i think this is because i have created them dynamically they just appear
after postback the page,
please can anyone help me on this or have an alternate solution ..

thank you all.
 
E

Eliyahu Goldin

Instead of creating textboxes dynamically you should use templated columns
and put a textbox in the item template.

Eliyahu
 
G

Guest

Thank you,
i now that i can do this but i tried to find anothor solution, cuz i have 61
fields coming from that file, and thus i will have to define all these
template columns.

thank you again.
 

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

Top