| | |
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 |
.net 2.0 3.5 ajax alltypeofvideos appliances asp asp.net beginner box browser businesslogiclayer button c# cac checkbox class commonfunctions compatible content contenttype control countryselector courier dataaccesslayer database datagrid datagridview datalist deployment development dgv dialog dropdownlist dropdownmenu dynamic dynamically edit embeddingactivexcontrol fileuploader fill findcontrol flash flv gridview gudi iis javascript list listbox login menu microsoft mouse mssql nameisnotdeclared news novell numerical opera order panelmasterpagebuttoncontrols problem radio ratings redirect registration relationaldatabases reportemail schoolproject search security serializesmo.table sessionvariables silverlight smoobjects software sql sql-server sqlserver2005 ssl tracking treeview validatedate validation vb.net videos vista visual-studio visualstudio vs2008 web webapplications webarchitecture webdevelopment webprogramming webservice wizard xsl youareanotmemberofthedebuggerusers






