Nested Repeater and Textbox problem

  • Thread starter Thread starter Tommy
  • Start date Start date
T

Tommy

I have a nested repeater. It displays the data correctly, etc..

I have a problem however.. when i iterate through the textboxes in my code
all of the values of the text property are empty. I need to loop through
them and do some validation, etc before I can update the data.

Is there something i need to do to make them post to the server beofore i
begin iterating through them?

Thanks in advance.
Tommy
 
Hey Tommy,

I think it's probably the way you are trying to access the text property
rather than the actual values being empty.

Put a onTextChanged event on your textbox and then use the following code to
get the values, the code is for a datagrid but you can modify it for the
repeater control, just cast to a dataitem I think.

DataGridItem dgi = (DataGridItem)(((Control)sender).NamingContainer);
string TextValue = ((TextBox) dgi.Cells[0].Controls[1]).Text;


Hope it helps
 
Back
Top