how to enable

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
 
R

Ravi

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top