Click to See Complete Forum and Search --> : datagrids Edit command not firing


wagae
02-28-2006, 09:53 AM
have a datagrid, whish shows the values and a column with edit, when i click Edit, the edit command does not fire.

here is my html "

<asp:DataGrid id="dgClients" style="Z-INDEX: 102; LEFT: 16px; POSITION: absolute; TOP: 152px"
runat="server" AutoGenerateColumns="False" BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px"
BackColor="White" CellPadding="4">
<SelectedItemStyle Font-Bold="True" ForeColor="#CCFF99" BackColor="#009999"></SelectedItemStyle>
<ItemStyle ForeColor="#003399" BackColor="White"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="#CCCCFF" BackColor="#003399"></HeaderStyle>
<FooterStyle ForeColor="#003399" BackColor="#99CCCC"></FooterStyle>
<Columns>
<asp:BoundColumn DataField="Account" HeaderText="Account"></asp:BoundColumn>
<asp:BoundColumn DataField="Address" HeaderText="Address"></asp:BoundColumn>
<asp:BoundColumn DataField="Telephone" HeaderText="Telephone"></asp:BoundColumn>
<asp:BoundColumn DataField="Value" HeaderText="Value"></asp:BoundColumn>
<asp:BoundColumn DataField="Quantityr" HeaderText="Quantity"></asp:BoundColumn>
<asp:BoundColumn DataField="ShortName" HeaderText="ShortName"></asp:BoundColumn>
<asp:BoundColumn DataField="Cash" HeaderText="Cash"></asp:BoundColumn>
<asp:EditCommandColumn ButtonType="LinkButton" UpdateText="Update" HeaderText="Manage" CancelText="Cancel"
EditText="Edit"></asp:EditCommandColumn>
</Columns>
<PagerStyle HorizontalAlign="Left" ForeColor="#003399" BackColor="#99CCCC" Mode="NumericPages"></PagerStyle>
</asp:DataGrid>



and my code behind

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then

DsClient = IPFunctions.ViewClient()
dgClients.DataSource = DsClient
dgClients.DataBind()


End If
End Sub


Private Sub dgClients_PageIndexChanged(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridPageChangedEventArgs) Handles dgClientDetails.PageIndexChanged
dgClients.CurrentPageIndex = e.NewPageIndex
dgClients.DataBind()
End Sub

Private Sub dgClients_EditCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles dgClientDetails.EditCommand
.EditItemIndex = e.Item.ItemIndex
dgClients.DataBind()
End Sub
All help would greatly be apppreciated

sirpelidor
02-28-2006, 03:43 PM
where's ur <ItemTemplate> and <EditItemTemplate>?