pl help me urgent datagrid
Hi
i have one datagrid and 4 checkboxes(asume chk1,chk2,chk3,chk4) in my web form.
when ever user checked the
chk3 then only i want to show edit option in datagrid.
i tried following 2 ways but both failed
1. degign time i declared my datagrid as
<asp:datagrid id="grd" AutoGenerateColumns="true" OnCancelCommand="doitemcancel" OnUpdateCommand="doitemupdate"
onEditCommand="doitemedit" PagerStyle-HorizontalAlign="Right" AllowPaging="true" PagerStyle-Mode="NumericPages"
PageSize="20" Runat="server">
<Columns>
<asp:EditCommandColumn EditText="edit" CancelText="cancel" UpdateText="update" />
</Columns>
</asp:datagrid>
in this case i dont know how to hide this editcommandcolumn in runtime.
2.this time i didn't declared columns in design time
<asp:datagrid id="grd" AutoGenerateColumns="true" OnCancelCommand="doitemcancel" OnUpdateCommand="doitemupdate"
onEditCommand="doitemedit" PagerStyle-HorizontalAlign="Right" AllowPaging="true" PagerStyle-Mode="NumericPages"
PageSize="20" Runat="server">
</asp:datagrid>
and runtime i created controle like
Protected x As New System.Web.UI.WebControls.EditCommandColumn
x.EditText = "edit"
grd.Columns(.add(x))
but here problem is doitemedit(which declared in oneditcommand) method is not firing
pl help me how to do this.
thanks
|