By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,964 Members | 1,318 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,964 IT Pros & Developers. It's quick & easy.

TextBox inside a DataGrid

P: n/a
Hi

I have a datagrid with a TemplateColumn where I have put inside a TextBox
without databinding with the data source.
The TextBox is used to type a number for each row of the datagrid.
I have set the AutoPostBack property of TextBox to true and I have raise
TextChanged event to make some control on typed number.
When I type a number on one TextBox and click out of control to raise the
event, the method that raise the event is called and the property Text of
the TextBox is correctly set to the typed number, but when the datagrid is
displayed after postback the textbox is empty, it sounds like
EnableViewState doesn't work.
Is this behaviour correct ? if yes is possible to workaround ?

Thanks is advance.

Simon.


Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Are you re-binding the DataGrid during the postback? Perhaps you could show
us the event handler code.

--
Scott
http://www.OdeToCode.com/blogs/scott/
Hi

I have a datagrid with a TemplateColumn where I have put inside a
TextBox
without databinding with the data source.
The TextBox is used to type a number for each row of the datagrid.
I have set the AutoPostBack property of TextBox to true and I have
raise
TextChanged event to make some control on typed number.
When I type a number on one TextBox and click out of control to raise
the
event, the method that raise the event is called and the property
Text of
the TextBox is correctly set to the typed number, but when the
datagrid is
displayed after postback the textbox is empty, it sounds like
EnableViewState doesn't work.
Is this behaviour correct ? if yes is possible to workaround ?
Thanks is advance.

Simon.

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.