ChanderMadhavi
asked on
datagridcommand brings up a empty row
Hi
I am trying to create a datagrid to update a table. When I click on the edit link/button a grid with a headers is brought up. There are no text boxes to click. I am pasting the code below. Could someone please help.
Private Sub dgLineFill_EditCommand(ByV al source As Object, ByVal e As System.Web.UI.WebControls. DataGridCo mmandEvent Args) Handles dgLineFill.EditCommand
dgLineFill.EditItemIndex = Int32.Parse(e.Item.ItemInd ex)
dgLineFill.DataBind()
End Sub
'this is in pageload
If Not IsPostBack Then
daLineFill.Fill(dsLineFill 1, "lineFill")
dgLineFill.DataSource = dsLineFill1
dgLineFill.DataMember = "lineFill"
dgLineFill.DataBind()
'dsLineFill1.AcceptChanges ()
End If
<asp:DataGrid id="dgLineFill" runat="server" Height="136px" Width="272px" DataSource="<%# dsLineFill1 %>" DataKeyField="LineFillID" DataMember="LineFill" AutoGenerateColumns="False ">
<Columns>
<asp:BoundColumn DataField="LineFillID" HeaderText="LineFillID"></ asp:BoundC olumn>
<asp:BoundColumn DataField="LineID" HeaderText="LineID"></asp: BoundColum n>
<asp:BoundColumn DataField="MonthYear" HeaderText="MonthYear"></a sp:BoundCo lumn>
<asp:BoundColumn DataField="LineFillVolume" HeaderText="LineFillVolume "></asp:Bo undColumn>
<asp:BoundColumn DataField="LocationFormID" HeaderText="LocationFormID "></asp:Bo undColumn>
<asp:BoundColumn DataField="LocationToID" HeaderText="LocationToID"> </asp:Boun dColumn>
<asp:EditCommandColumn ButtonType="PushButton" UpdateText="Update" CancelText="Cancel" EditText="Edit"></asp:Edit CommandCol umn>
</Columns>
</asp:DataGrid>
Thanks in advance for your help.
I am trying to create a datagrid to update a table. When I click on the edit link/button a grid with a headers is brought up. There are no text boxes to click. I am pasting the code below. Could someone please help.
Private Sub dgLineFill_EditCommand(ByV
dgLineFill.EditItemIndex = Int32.Parse(e.Item.ItemInd
dgLineFill.DataBind()
End Sub
'this is in pageload
If Not IsPostBack Then
daLineFill.Fill(dsLineFill
dgLineFill.DataSource = dsLineFill1
dgLineFill.DataMember = "lineFill"
dgLineFill.DataBind()
'dsLineFill1.AcceptChanges
End If
<asp:DataGrid id="dgLineFill" runat="server" Height="136px" Width="272px" DataSource="<%# dsLineFill1 %>" DataKeyField="LineFillID" DataMember="LineFill" AutoGenerateColumns="False
<Columns>
<asp:BoundColumn DataField="LineFillID" HeaderText="LineFillID"></
<asp:BoundColumn DataField="LineID" HeaderText="LineID"></asp:
<asp:BoundColumn DataField="MonthYear" HeaderText="MonthYear"></a
<asp:BoundColumn DataField="LineFillVolume"
<asp:BoundColumn DataField="LocationFormID"
<asp:BoundColumn DataField="LocationToID" HeaderText="LocationToID">
<asp:EditCommandColumn ButtonType="PushButton" UpdateText="Update" CancelText="Cancel" EditText="Edit"></asp:Edit
</Columns>
</asp:DataGrid>
Thanks in advance for your help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.