Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET SQL-Server
Hello Experts !
 

Am working on Asp.net Project using C#, SqlServer 2005.
 
presently am working on Gridview,
 
Firstly i have 4 textboxes above gridview and 4 textboxes in Gridview footer and a submit button outside girdview.
 
when i clicks the submit button outside gridview. all the data from outside textboxes and data from footer textboxes must be submitted in database.
 
Please help thanks in advance.
Posted 12-Apr-13 4:46am
Comments
richcb at 12-Apr-13 10:04am
   
What have you tried? Where is your code?
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Hi Ranjith,
 
By now, you must be able to make Db calls for add/insert/update/delete a records in the DB.
So, im not going to tell you how to do that.
 
For, getting the GridView Footer row's Textbox value, you can search it this way,
 
((TextBox)GridView.FooterRow.FindControl("Textbox_Name")).Text;
 
This should get you the value. You can get the rest of them similarly and make a Db call to save the values.
 
Happy Coding.!
 
Thank you,
Vamsi
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

For Each objGridItem As Telerik.Web.UI.GridDataItem In grdQuestions.MasterTableView.Items()
 
Dim chk As CheckBoxList = objGridItem.FindControl("ChkListQuestion")
                   If Not chk.SelectedValue = "" Then
                       optioncode = chk.SelectedValue
                   End If
 

Dim txtFreeText As TextBox = objGridItem.FindControl("txtQuestion")
                   suppliedtext = txtFreeText.Text
 

Dim dropDown As RadComboBox = objGridItem.FindControl("drpQuestion")
                   If Not dropDown.SelectedValue = "" Then
                       optioncode = dropDown.SelectedValue
                   End If
 
Next
 

dim dr as dropDown= GridView.FooterRow.FindControl("Dropdown1")).Text;
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Maciej Los 295
1 OriginalGriff 249
2 Sergey Alexandrovich Kryukov 205
3 Aajmot Sk 197
4 Sinisa Hajnal 176
0 OriginalGriff 7,800
1 Sergey Alexandrovich Kryukov 7,072
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,790


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 15 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100