Skip to main content

Posts

Showing posts with the label GRIDVIEW

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

ASP.Net GridView CommandField Delete Command

ASP.Net GridView control provides a CommandField that enables you to display the Delete Command button. You can easily attach the GridView event such as RowDeleting to implement the delete command of GridView control. Command Event Used 1. OnRowDeleting GridView Property Used 1. DataKeys

ASP.Net GridView Checkbox Column Select All using C#

You can apply the C# foreach loop to loop over each row item of GridView control and use the C# FindControl method to get the checkbox control placed inside the GridView control. Set the Checked property of each checkbox retrieved using FindControl method from each row of GridView equal to true that will select all the checkboxes placed inside the GridView control. C# Methods Used 1. C# foreach loop 2. FindControl method http://programming.top54u.com/post/ASP-Net-GridView-Checkbox-Select-All-using-C-sharp.aspx