Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a 'n' columns out of which 2 columns in gridview are fields containing names.1 column is in english . I want the other column(initially blank) to get the same name which is in english in hindi automatically.

After tht i am tryng for updating selected rows using checkbox option. The selected rows must b updated on a btn_click event.

I tried this code in asp page..for adding checkboxes in multiple lines of grid view.
XML
<asp:TemplateField HeaderText="Select"; ItemStyle-HorizontalAlign=Center>;
  <itemtemplate>
      <asp:CheckBox ID="chkselect"; runat="server"> AutoPostBack="true">
  </itemtemplate>
Posted
Updated 30-Jan-13 5:15am
v3
Comments
sri67 30-Jan-13 6:26am    
To update the slected checkboxes in c#..i wrote the following under btn_click event..

foreach (GridViewRow di in GridView1.Rows)
{
CheckBox ckselect = (CheckBox)di.FindControl("chkselect");

if (ckselect != null && ckselect.Checked)
{

OleDbCommand command = new OleDbCommand("update query ", connection);

1 solution

 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900