how to enable

  • Thread starter Thread starter Yoshitha
  • Start date Start date
Y

Yoshitha

Hi

inorder to display check boxes in datagrid, in itemtemplate i had written
like this.


<input type="checkbox" id="chkclient" runat="server" name="chkclient"
disabled>

also am using <asp:editcommandcolumn>.

what i want is whenever i click on edit button within any row of a
datagrid, the check box which is preseted on that row will be enabled.


Private Sub dgCandidate_EditCommand(ByVal source As Object, ByVal e As

System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
dgCandidate.EditCommand

dgCandidate.EditItemIndex = e.Item.ItemIndex

endsub

how to enable that particulr checkbox within the above given procedure.

or can you tell where to write that code and how to enable .


thanx in advance
yoshitha
 
Hi yoshitha,

Use server side checkbox and enable it in dgCandidate_EditCommand event.

Ex:
Write this code in itemtemplate
<asp:CheckBox ID="chkClient" Runat=server Enabled=False></asp:CheckBox>

Write this code in dgCandidate_EditCommand evnt
chkClient = DirectCast(e.Item.FindControl("chkClient"), CheckBox)
chkClient.Enabled = True


Hope this code will help you.

Ravi.
 
Back
Top