Click here to Skip to main content
16,005,080 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Image loading Pin
N a v a n e e t h14-Sep-07 21:39
N a v a n e e t h14-Sep-07 21:39 
Questiontable web server control Pin
Ballita13-Sep-07 23:40
Ballita13-Sep-07 23:40 
AnswerRe: table web server control Pin
Blue_Boy13-Sep-07 23:53
Blue_Boy13-Sep-07 23:53 
QuestionGridview Paging and Sorting Pin
satishkumarnk13-Sep-07 23:12
satishkumarnk13-Sep-07 23:12 
AnswerRe: Gridview Paging and Sorting Pin
ElSpinos13-Sep-07 23:45
ElSpinos13-Sep-07 23:45 
Questiongridview to database Pin
sangramkp13-Sep-07 23:11
sangramkp13-Sep-07 23:11 
AnswerRe: gridview to database Pin
N a v a n e e t h13-Sep-07 23:55
N a v a n e e t h13-Sep-07 23:55 
AnswerRe: gridview to database [modified] Pin
ElSpinos14-Sep-07 0:00
ElSpinos14-Sep-07 0:00 
Hi there sangramkp,

From what i understand in your requirement is that you want to take the values from an already populated GridView control and insert the last three columns into a table called tblSlab. You will need to iterate through the GridView's Rows property and extract the cells by index since you know which ones you need, consider the following code:

<code>
  foreach (GridViewRow row in GridView.Rows)
  {
   // You indicated you wanted the last three cells...
   // Note that the cells collection is zero based...
   sqlScript = "Insert Into tblSlab Values(" + row.Cells[1].Text + ", " + row.Cells[2].Text + ", " + row.Cells[3].Text + ", ";
   // Now execute your code to insert the record into your table...
  }
</code>


And thats it... Have fun! Smile | :)


-- modified at 6:18 Friday 14th September, 2007

Fernando Mendes
Senior .NET Developer, Architect

QuestionNewsletter in ASP.NET Pin
.NET- India 13-Sep-07 22:56
.NET- India 13-Sep-07 22:56 
AnswerRe: Newsletter in ASP.NET Pin
Pete O'Hanlon13-Sep-07 23:35
mvePete O'Hanlon13-Sep-07 23:35 
Questionsession problem Pin
saravanan0513-Sep-07 21:41
saravanan0513-Sep-07 21:41 
AnswerRe: session problem Pin
\laddie13-Sep-07 21:49
\laddie13-Sep-07 21:49 
AnswerRe: session problem Pin
Urs Enzler13-Sep-07 22:15
Urs Enzler13-Sep-07 22:15 
AnswerRe: session problem Pin
Jintal Patel13-Sep-07 22:20
Jintal Patel13-Sep-07 22:20 
AnswerRe: session problem Pin
N a v a n e e t h13-Sep-07 23:41
N a v a n e e t h13-Sep-07 23:41 
QuestionOpen New Window Pin
.NET- India 13-Sep-07 21:40
.NET- India 13-Sep-07 21:40 
AnswerRe: Open New Window Pin
\laddie13-Sep-07 21:44
\laddie13-Sep-07 21:44 
GeneralRe: Open New Window Pin
.NET- India 13-Sep-07 21:49
.NET- India 13-Sep-07 21:49 
AnswerRe: Open New Window Pin
varshavmane13-Sep-07 21:51
varshavmane13-Sep-07 21:51 
QuestionDisplaying text Pin
bhattiprolu13-Sep-07 21:39
bhattiprolu13-Sep-07 21:39 
AnswerRe: Displaying text Pin
N a v a n e e t h13-Sep-07 23:44
N a v a n e e t h13-Sep-07 23:44 
QuestionOnline Exam Pin
mehrdadc4813-Sep-07 21:36
mehrdadc4813-Sep-07 21:36 
QuestionInput box Pin
Sapan Roy13-Sep-07 21:35
Sapan Roy13-Sep-07 21:35 
AnswerRe: Input box Pin
SHatchard13-Sep-07 21:48
SHatchard13-Sep-07 21:48 
QuestionWant to buy a mail server. Pin
sandipan.neogi@gmail.com13-Sep-07 21:15
sandipan.neogi@gmail.com13-Sep-07 21:15 

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.