Click here to Skip to main content
15,917,645 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Modifing web gridview control Pin
ToddHileHoffer20-Dec-06 9:51
ToddHileHoffer20-Dec-06 9:51 
GeneralRe: Modifing web gridview control Pin
Quecumber25620-Dec-06 10:26
Quecumber25620-Dec-06 10:26 
QuestionSort Datagrid Pin
ADY00720-Dec-06 7:58
ADY00720-Dec-06 7:58 
AnswerRe: Sort Datagrid Pin
ToddHileHoffer20-Dec-06 8:14
ToddHileHoffer20-Dec-06 8:14 
GeneralRe: Sort Datagrid Pin
ADY00720-Dec-06 10:08
ADY00720-Dec-06 10:08 
GeneralRe: Sort Datagrid Pin
Haissam20-Dec-06 11:09
Haissam20-Dec-06 11:09 
Questionrender values from check box and update to database on button click Pin
srishree20-Dec-06 7:56
srishree20-Dec-06 7:56 
AnswerRe: render values from check box and update to database on button click Pin
ToddHileHoffer20-Dec-06 8:11
ToddHileHoffer20-Dec-06 8:11 
To make this just a bit easier. Create a template column in your gridview. Hide the checkboxe in the itembound event when the database value is null. That solves the problem of maintaining the viewstate of the grid.

Now to loop through your gridview. Here is some sample code to put behind your button (or during any event really).

CheckBox cb;
foreach (GridViewRow r in this.GridView1.Rows)
{
cb = (CheckBox)r.FindControl("cbUpdate");
if (cb.Checked)
{
//put code to update database
}
}




GeneralRe: render values from check box and update to database on button click Pin
srishree20-Dec-06 9:34
srishree20-Dec-06 9:34 
GeneralRe: render values from check box and update to database on button click Pin
ToddHileHoffer20-Dec-06 9:52
ToddHileHoffer20-Dec-06 9:52 
GeneralRe: render values from check box and update to database on button click Pin
srishree20-Dec-06 10:06
srishree20-Dec-06 10:06 
QuestionDataGrid not fiiring ItemDataBound event Pin
gems521620-Dec-06 6:21
gems521620-Dec-06 6:21 
AnswerRe: DataGrid not fiiring ItemDataBound event Pin
ToddHileHoffer20-Dec-06 7:09
ToddHileHoffer20-Dec-06 7:09 
GeneralRe: DataGrid not fiiring ItemDataBound event Pin
gems521620-Dec-06 7:25
gems521620-Dec-06 7:25 
QuestionWeb application on a network Pin
MoeInsairat20-Dec-06 4:57
MoeInsairat20-Dec-06 4:57 
AnswerRe: Web application on a network Pin
ToddHileHoffer20-Dec-06 5:20
ToddHileHoffer20-Dec-06 5:20 
QuestionCauses Validation Pin
Dayekh20-Dec-06 4:38
Dayekh20-Dec-06 4:38 
AnswerRe: Causes Validation Pin
ToddHileHoffer20-Dec-06 4:47
ToddHileHoffer20-Dec-06 4:47 
GeneralRe: Causes Validation Pin
Dayekh20-Dec-06 4:52
Dayekh20-Dec-06 4:52 
GeneralRe: Causes Validation Pin
ToddHileHoffer20-Dec-06 4:55
ToddHileHoffer20-Dec-06 4:55 
GeneralRe: Causes Validation Pin
Dayekh20-Dec-06 4:56
Dayekh20-Dec-06 4:56 
GeneralRe: Causes Validation Pin
ToddHileHoffer20-Dec-06 5:17
ToddHileHoffer20-Dec-06 5:17 
GeneralRe: Causes Validation Pin
Dayekh20-Dec-06 5:21
Dayekh20-Dec-06 5:21 
QuestionConvert video to flash using vid2swf Pin
Guffa20-Dec-06 4:27
Guffa20-Dec-06 4:27 
AnswerRe: Convert video to flash using vid2swf Pin
RichardGrimmer21-Dec-06 1:25
RichardGrimmer21-Dec-06 1:25 

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.