M
michel
Hi,
there is a gridview with a Commandfield.
I would like to set the 'ShowEditButton' on 'true' programmatically.
I tried two ways without succes:
with "'Dim cf As CommandField
with "'Dim cf As new CommandField"
no error but no ShowEditButton:
aspx file:
-------
<asp:GridView ID="GridView1" runat="server">
<Columns>
<asp:CommandField />
.........
</Columns>
</asp:GridView>
code-behind:
-------------
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
'Dim cf As CommandField
Dim cf As new CommandField
cf = GridView1.Columns.Item(0)
cf.ShowEditButton = True
....
there is a gridview with a Commandfield.
I would like to set the 'ShowEditButton' on 'true' programmatically.
I tried two ways without succes:
with "'Dim cf As CommandField
with "'Dim cf As new CommandField"
no error but no ShowEditButton:
aspx file:
-------
<asp:GridView ID="GridView1" runat="server">
<Columns>
<asp:CommandField />
.........
</Columns>
</asp:GridView>
code-behind:
-------------
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
'Dim cf As CommandField
Dim cf As new CommandField
cf = GridView1.Columns.Item(0)
cf.ShowEditButton = True
....