Skip to main content

ASP.Net GridView Edit Update Dropdownlist Values using C#

Edit or Update command of GridView control provides the functionality to change the GridView mode from read only view to edit mode and then update the new selected value of DropdownList into the SQL Database table. You can use the C# FindControl method to get the reference of nested Dropdownlist control that enables you to get the new selectedvalue and save it into the database table.
Command Events Used

1. OnRowEditing

2. OnRowCancelingEdit

3. OnRowUpdating
GridView Property Used

1. DataKeys
C# Method Used

1. FindControl





http://programming.top54u.com/post/Edit-Update-GridView-DropDownList-SelectedValue.aspx

Comments

Popular posts from this blog

Drawing Line Charts In asp.net

LineChart.cs import the following namespaces using System.Drawing; using System.Drawing.Drawing2D; using System.Drawing.Imaging; using System.Collections; public class LineChart { public Bitmap Bitmapb; public string strTitle = "Default Title"; public ArrayList ArrayListchartValues = new ArrayList(); public float ftXorigin = 0, ftYorigin = 0; public float ftScaleX, ftScaleY; public float ftXdivs = 2, ftYdivs = 2; private int intWidth, intHeight; private Graphics Graphicsg; private Page Pagep; struct datapoint { public float ftx; public float fty; public bool bolvalid; } //initialize public LineChart(int intmyWidth, int intmyHeight, Page myPage) { intWidth = intmyWidth; intHeight = intmyHeight; ftScaleX = intmyWidth; ftScaleY = intmyHeight; Bitmapb = new Bitmap(intmyWidth, intmyHeight); Graphicsg = Graphics.FromImage(Bitmapb); Pagep = myPage; } pu...