Click here to Skip to main content
15,895,746 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionsorting dataView by using ordinal Pin
sishya6-Jul-06 9:58
sishya6-Jul-06 9:58 
AnswerRe: sorting dataView by using ordinal Pin
mnaveed6-Jul-06 23:52
mnaveed6-Jul-06 23:52 
QuestionWSE authenticated web service Pin
Jason Weibel6-Jul-06 4:31
Jason Weibel6-Jul-06 4:31 
Questiondynamic forms builder Pin
haneen19846-Jul-06 4:25
haneen19846-Jul-06 4:25 
AnswerRe: dynamic forms builder Pin
Jason Weibel6-Jul-06 5:26
Jason Weibel6-Jul-06 5:26 
QuestionPostback question Pin
leckey6-Jul-06 4:15
leckey6-Jul-06 4:15 
AnswerRe: Postback question Pin
ToddHileHoffer6-Jul-06 9:26
ToddHileHoffer6-Jul-06 9:26 
GeneralRe: Postback question Pin
leckey6-Jul-06 10:03
leckey6-Jul-06 10:03 
I got it to the point that I get my new blank lines to appear. However, I have the problem that if I enter data in line one, hit add line, and add a second line. It resets the first line--the data is lost. I tried setting session variables but still not working. This is the code for the add button:
private void Button2_Click(object sender, System.EventArgs e)<br />
		{	<br />
<br />
			DataGridItemCollection items = dgParts.Items;<br />
			int rows = items.Count;<br />
			if (rows == 0)<br />
			{<br />
		<br />
				BindData();<br />
				DataTable dt = ds.Tables["Rest"];<br />
				DataRow row;<br />
				row = dt.NewRow();<br />
				strPartNumberInputReference = txtSearchPart.Text;<br />
				row["PartNumber"] = strPartNumberInputReference; <br />
				row["DrawingNumber"]=DBNull.Value;<br />
				row["DrawingRevision"]=DBNull.Value;<br />
				row["DwgPath"]=DBNull.Value;<br />
<br />
				dt.Rows.Add(row);			<br />
				dt.AcceptChanges();	<br />
			<br />
				dgParts.DataSource=dt;			<br />
				dgParts.DataBind();<br />
				Session["test"]=ds;<br />
			}<br />
<br />
			else<br />
			{<br />
				ds = (DataSet)Session["test"];<br />
				DataTable dt = ds.Tables[0];<br />
				DataRow row;<br />
				row = dt.NewRow();	<br />
				strPartNumberInputReference = txtSearchPart.Text;<br />
				row["PartNumber"] = strPartNumberInputReference; <br />
				row["DrawingNumber"]=DBNull.Value;<br />
				row["DrawingRevision"]=DBNull.Value;<br />
				row["DwgPath"]=DBNull.Value;<br />
				dt.Rows.Add(row);			<br />
				dt.AcceptChanges();			  <br />
				dgParts.DataSource=dt;			<br />
				dgParts.DataBind();<br />
			}<br />
<br />
		}


Any ideas? Thanks for your help!
QuestionTiff file Pin
roopeshgangwar6-Jul-06 3:53
roopeshgangwar6-Jul-06 3:53 
AnswerRe: Tiff file Pin
ToddHileHoffer6-Jul-06 9:29
ToddHileHoffer6-Jul-06 9:29 
GeneralRe: Tiff file Pin
roopeshgangwar6-Jul-06 17:32
roopeshgangwar6-Jul-06 17:32 
QuestionPopup blocker window Pin
MalikRizwan6-Jul-06 3:41
MalikRizwan6-Jul-06 3:41 
AnswerRe: Popup blocker window Pin
Sushant Duggal6-Jul-06 18:18
Sushant Duggal6-Jul-06 18:18 
AnswerRe: Popup blocker window Pin
Vuks6-Jul-06 21:32
Vuks6-Jul-06 21:32 
GeneralRe: Popup blocker window Pin
MalikRizwan6-Jul-06 22:36
MalikRizwan6-Jul-06 22:36 
QuestionCombobox : Is there a max length on the ValueMember? Pin
Ronsch6-Jul-06 3:27
Ronsch6-Jul-06 3:27 
QuestionOpenCurrentDatabase..HANGING!!! ...Automation MS Access 2003 [modified] Pin
Vuks6-Jul-06 2:58
Vuks6-Jul-06 2:58 
QuestionCHAT Engine Pin
lehya6-Jul-06 2:56
lehya6-Jul-06 2:56 
Questionexporting data to MS-OutLook Calendar Pin
Dhruvil6-Jul-06 2:42
Dhruvil6-Jul-06 2:42 
Questionlist of Email clients installed on my computerlist of Email clients installed on my computer Pin
sharma sanjeev6-Jul-06 2:19
sharma sanjeev6-Jul-06 2:19 
AnswerRe: list of Email clients installed on my computerlist of Email clients installed on my computer Pin
Not Active6-Jul-06 2:39
mentorNot Active6-Jul-06 2:39 
Questionlist of Email clients installed on my computer Pin
sharma sanjeev6-Jul-06 2:18
sharma sanjeev6-Jul-06 2:18 
Questionlist of Email clients installed on my computer Pin
sharma sanjeev6-Jul-06 2:17
sharma sanjeev6-Jul-06 2:17 
Questionhow to store images in database of sqlserver2005 and retreive images from database Pin
vishal7056-Jul-06 2:07
vishal7056-Jul-06 2:07 
AnswerRe: how to store images in database of sqlserver2005 and retreive images from database Pin
_AK_6-Jul-06 2:12
_AK_6-Jul-06 2:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.