473,399 Members | 2,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

TextBox inside a DataGrid

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
1 1444
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: jm | last post by:
I have datagrid. Inside the template columms there is a textbox. It has an id. When the textbox wasn't inside the datagrid tags, I could reference with order_id.text = "some text" but all of a...
1
by: Irishmaninusa | last post by:
Hello Everyone, I have a datagrid and have used a text box as way to allow a user to edit items in the grid. My question for you is how is it possible to write code for the text change event of...
2
by: donnet | last post by:
Inside my .aspx file, I have a textbox populated with data from a dataset like this: <asp:TextBox text='<%# DataBinder.Eval(Container.DataItem, "Comment")%>' id="CommentText" runat="server"...
1
by: jason | last post by:
I've seen a few posts on this issue, but no clear solutions. I have a mulitiline textbox inside a datagrid. I use TemplateColumn to define as multiline with 3 rows. I have other field types...
0
by: jason | last post by:
Hello everyone. I am trying to write some custom command events into a DataGrid. The command that is currently giving me trouble is an "Add" custom command in the footer of a template column. ...
2
by: ismaelf | last post by:
i have a textbox in a template column in a datagrid, it displays the initial value of the row, but when i change it remains with the original value (it doesnt get the new value..) i fill the...
0
by: dylan180 | last post by:
i have a datagrid that have a coloum name week1 that inside this coloum i have 2 textbox name Qty and Price. When the data grid in the edit mode it will autopostback from the Qty(textbox), after that...
1
by: preeti13 | last post by:
hey i am trying to put the textbox column inside the datagrid but i don't have any idea how to do that please any one help me with this my code is like this: <asp:datagrid id="garidreason"...
1
by: CindyH | last post by:
Hi I'm using vs.net 2003. I have a dropdownlist inside a datagrid. I would like to be able to select a value from the dropdownlist and then have a textbox which is also inside the datagrid filled...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.