| | |
SOS - datagrid problem
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Feb 2007
Posts: 7
Reputation:
Solved Threads: 1
I'm using the following code to pass data to a table in my database. The datagrid consists of a bound column and 3 template columns (2 textboxes and a chackebox).
The problem is that the values of these template columns cannot be read. (i.e. in the following code, values of qtyTextBox and desTextBox are "" and addChackBox.Checked is always 'false' even if it is checked).
HELP!!!
The problem is that the values of these template columns cannot be read. (i.e. in the following code, values of qtyTextBox and desTextBox are "" and addChackBox.Checked is always 'false' even if it is checked).
HELP!!!
for (int i = 0; i < dgaddf.Items.Count; i++) { DataGridItem item = dgaddf.Items[i]; string it = item.Cells[1].Text.ToString(); TextBox qtyTextBox (TextBox)item.FindControl("txtQ"); TextBox desTextBox=(TextBox)item.FindControl("txtD"); CheckBox addCheckBox = (CheckBox)item.FindControl("Chk1"); if (addCheckBox.Checked) { br.createFloRec(it, int.Parse(qtyTextBox.Text), desTextBox.Text, connect1.con); // the function that adds data to the DB } }
Last edited by c# seeker; Feb 19th, 2007 at 4:32 am.
Which event is this code running from?
Did you trace with Studio (debug)?
Did you trace with Studio (debug)?
Google is your friend. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
Bored? Visit http://www.kaelisspace.com/
Bored? Visit http://www.kaelisspace.com/
![]() |
Similar Threads
- Need help on export asp.net table to excel (ASP.NET)
- error on page!! Cannot solve!!Help (ASP.NET)
- How to do input validation when i am inserting new record into a datagrid ? (VB.NET)
- Can't view post (DaniWeb Community Feedback)
- is this possible? (C#)
Other Threads in the ASP.NET Forum
- Previous Thread: Visual Studio 2005 Application Error
- Next Thread: Windows script host and filesystemobject - pls help
| Thread Tools | Search this Thread |
Tag cloud for ASP.NET
.net 2.0 ajax alltypeofvideos anathor appliances application asp asp.net bc30451 beginner box browser button c# cac checkbox commonfunctions complex control dataaccesslayer database datagridview datalist deployment development dgv dialog dropdownlist dynamic dynamically edit editing embeddingactivexcontrol expose feedback fileuploader fill findcontrol flash form formatdecimal formview gridview gudi iis image javascript languages list listbox login microsoft migration mobile mouse mssql news novell numerical opera panelmasterpagebuttoncontrols parent problem project radio redirect registration relationaldatabases reportemail response.redirect richtextbox rows schoolproject search security select sessionvariables silverlight smoobjects software sql-server sqlserver2005 ssl tracking treeview unauthorized validatedate validation vb.net videos vista visualstudio web webapplications webdevelopment webprogramming webservice xsl youareanotmemberofthedebuggerusers






