Click here to Skip to main content
15,890,438 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: FOR CREATE A NEW JOB WEBSITE LIKE MODIS Pin
annathor22-Apr-10 20:58
annathor22-Apr-10 20:58 
JokeRe: FOR CREATE A NEW JOB WEBSITE LIKE MODIS Pin
Abhijit Jana22-Apr-10 21:04
professionalAbhijit Jana22-Apr-10 21:04 
GeneralRe: FOR CREATE A NEW JOB WEBSITE LIKE MODIS Pin
Estys22-Apr-10 21:33
Estys22-Apr-10 21:33 
AnswerRe: FOR CREATE A NEW JOB WEBSITE LIKE MODIS Pin
Sandesh M Patil22-Apr-10 22:37
Sandesh M Patil22-Apr-10 22:37 
QuestionImplimeting indian regional languages in asp.net web application Pin
arunpal22-Apr-10 18:52
arunpal22-Apr-10 18:52 
AnswerRe: Implimeting indian regional languages in asp.net web application Pin
Sandeep Mewara22-Apr-10 19:29
mveSandeep Mewara22-Apr-10 19:29 
GeneralRe: Implimeting indian regional languages in asp.net web application Pin
arunpal28-Apr-10 21:18
arunpal28-Apr-10 21:18 
QuestionAdding and updating rows in a GridView Pin
Rob Bigg22-Apr-10 18:08
Rob Bigg22-Apr-10 18:08 
Hi All,

I'm having a problem with some code and hope you may have some suggestions. I'm attempting to generate records in an SQL database table whenever a page is loaded by adding and updating rows in a GridView. The following code snippet is part of my Page_Load function and is looped several times.

//Insert an empty row at index 0 of GridView1
SqlDataSource1.Insert();

//Locate the labels in row 0 to be updated (these are 2-way databound in item mode)
Label Name = GridView1.Rows[0].FindControl("Label1") as Label;
Label Desc = GridView1.Rows[0].FindControl("Label2") as Label;
Label Date = GridView1.Rows[0].FindControl("Label3") as Label;
Label Note = GridView1.Rows[0].FindControl("Label4") as Label;

//Update text values of labels
Name.Text = CN.Text;
Debug.WriteLine("Common Name = " + Name.Text);
Desc.Text = D.Text;
Debug.WriteLine("Description = " + Desc.Text);
Date.Text = DateTime.Now.ToShortDateString();
Debug.WriteLine("Date = " + Date.Text);
Note.Text = N.Text;
Debug.WriteLine("Note = " + Note.Text);

//Update the data source record in GridView1 row 0
GridView1.UpdateRow(0, false);


I know from the debug output that the looping and label text value assignments are happening correctly. The browser output, however, is a GridView with empty rows - except for the last row! I can understand all the rows being blank, but the fact that it appears to be working to some extent is perplexing me. Any help would be appreciated!
AnswerRe: Adding and updating rows in a GridView Pin
Sandeep Mewara22-Apr-10 19:46
mveSandeep Mewara22-Apr-10 19:46 
GeneralRe: Adding and updating rows in a GridView Pin
Rob Bigg23-Apr-10 7:40
Rob Bigg23-Apr-10 7:40 
GeneralRe: Adding and updating rows in a GridView Pin
Sandeep Mewara23-Apr-10 8:13
mveSandeep Mewara23-Apr-10 8:13 
QuestionTextBox Retains old data on dialog reloading Pin
FUNCTOR9922-Apr-10 14:27
FUNCTOR9922-Apr-10 14:27 
AnswerRe: TextBox Retains old data on dialog reloading Pin
Arindam Tewary22-Apr-10 22:15
professionalArindam Tewary22-Apr-10 22:15 
GeneralRe: TextBox Retains old data on dialog reloading Pin
FUNCTOR9923-Apr-10 3:32
FUNCTOR9923-Apr-10 3:32 
AnswerRe: TextBox Retains old data on dialog reloading Pin
Arindam Tewary25-Apr-10 10:31
professionalArindam Tewary25-Apr-10 10:31 
GeneralRe: TextBox Retains old data on dialog reloading Pin
FUNCTOR9926-Apr-10 3:36
FUNCTOR9926-Apr-10 3:36 
Questionhow to make gridview column text no wrap and how to create a resizable column header Pin
Andraw11122-Apr-10 10:27
Andraw11122-Apr-10 10:27 
AnswerRe: how to make gridview column text no wrap and how to create a resizable column header Pin
Jamil Hallal22-Apr-10 11:15
professionalJamil Hallal22-Apr-10 11:15 
GeneralRe: how to make gridview column text no wrap and how to create a resizable column header Pin
Andraw11122-Apr-10 11:29
Andraw11122-Apr-10 11:29 
GeneralRe: how to make gridview column text no wrap and how to create a resizable column header Pin
Jamil Hallal22-Apr-10 11:44
professionalJamil Hallal22-Apr-10 11:44 
GeneralRe: how to make gridview column text no wrap and how to create a resizable column header Pin
Andraw11122-Apr-10 12:12
Andraw11122-Apr-10 12:12 
GeneralRe: how to make gridview column text no wrap and how to create a resizable column header Pin
Jamil Hallal22-Apr-10 12:36
professionalJamil Hallal22-Apr-10 12:36 
AnswerRe: how to make gridview column text no wrap and how to create a resizable column header Pin
Jamil Hallal22-Apr-10 11:20
professionalJamil Hallal22-Apr-10 11:20 
GeneralRe: how to make gridview column text no wrap and how to create a resizable column header Pin
Andraw11122-Apr-10 12:10
Andraw11122-Apr-10 12:10 
QuestionWeb Service Returns 2nd Half of Data [SOLVED] Pin
#realJSOP22-Apr-10 7:43
mve#realJSOP22-Apr-10 7:43 

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.