0

Hi

I have a gridview with data and checkbox. I want to Move selected to rows into another table(DB) when Dropdownlist is changed.(Just like a Yahoomail moving the selected mails to Folders)


Please help me

Thanks in advance

3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by kirank28
0

Using a for loop iterate the GridView.Rows collection to see whether the Checkbox is checked. If it is checked, then retrive the data and insert/update into another table.

foreach(GridViewRow gridRow in GridView1.Rows)
{  
    CheckBox chkBox1 = gridRow .FindControl("yourCheckBoxId");  
    if(chkBox1.Checked)         
    {           
       //Write code to retrieve the values from GridView row using gridRow.Cells collection and insert/Update into another table           
     }    
   }
}
0

hi ,

<URL SNIPPED> hope this code will helps you.

now in this case wht you can do use the above sample code
create one lable (any name ) and udpate you'r code with that lable
and on Display the inbox item you can query such that (show item without label)

hope it will helps you.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.