Connecting Tech Pros Worldwide Help | Site Map

how to enable

Yoshitha
Guest
 
Posts: n/a
#1: Nov 19 '05
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


Ravi
Guest
 
Posts: n/a
#2: Nov 19 '05

re: how to enable


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.

"Yoshitha" <gudivada_kmm@rediffmail.com> wrote in message news:<#WDDC8HIFHA.720@TK2MSFTNGP10.phx.gbl>...[color=blue]
> 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[/color]
Closed Thread