enable/disable checkbox in data grid on edit
Hi Guys,
I have an urget problem pls help me.
I have a datagrid with a checkbox column and a dropdownlist column. Both are in Template columns and both are disabled( greyed out) in the begining .
and i have edititem command.
I wanted to make both checkbox and dropdown list editable when edit button is clicked .
I tried
e.Item.Cells[1].Enabled = true;
e.Item.Cells[1].FindControl("Active").Enabled = true;
But nothing seemed to work .
Plssssssss help me . Its very urgent
FYI
My html code is
<asp:EditCommandColumn ButtonType="LinkButton" UpdateText="Update" CancelText="Cancel" EditText="Edit"></asp:EditCommandColumn>
<asp:TemplateColumn HeaderText="Inactive">
<ItemTemplate>
<asp:CheckBox ID="Active" Runat="server" Enabled=False Checked='<%# DataBinder.Eval(Container.DataItem, "Active")%>'>
</asp:CheckBox>
</ItemTemplate>
</asp:TemplateColumn>
<asp:BoundColumn DataField="Description" ReadOnly="True" HeaderText="Product Line"></asp:BoundColumn>
<asp:BoundColumn DataField="ProductLinecode" ReadOnly="True" HeaderText="Product Line Code"></asp:BoundColumn>
<asp:TemplateColumn HeaderText="Fullfillment Extract">
<ItemTemplate>
<asp:DropDownList ID="DropdownListFullfilment" Enabled="False" Runat="server" Width="100px"></asp:DropDownList>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid></td>
|