DetailsView with Dataset

Discussion in 'ASP .Net' started by Guest, Mar 16, 2006.

  1. Guest

    Guest Guest

    Hi
    I'm trying to read values from editing row. I attempt to use :
    protected void _DetailsView_RowUpdating(object sender,
    GridViewUpdateEventArgs e)

    {
    string s = e.NewValues["columnName"];
    .....
    }

    but e.NewValues.Count = 0 and e.OldValues.Count = 0 and e.Keys.Count = 0.
    DataKeyNames is filled with the names of the correct keys. Can someone
    suggest me where I am erring ? Does an other way exist to fetch these values
    from the details fields ?
    Thank and Best regards
     
    Guest, Mar 16, 2006
    #1
    1. Advertisements

  2. Guest

    Guest Guest

    Make sure each control that is used for data entry has a valid Bind
    statement, e.g.
    <asp:TextBox MaxLength="50" Width="300" ID="txtCompany" runat="server"
    Text='<%# Bind("Company") %>'></asp:TextBox>
     
    Guest, Mar 16, 2006
    #2
    1. Advertisements

  3. Guest

    Guest Guest

    My application is a bit anomolus. Infact I have not a database but purely a
    dataset to work. So that I have loaded the dataset drectly on the datasource
    property.
    I don't know as to bind data in this case. Can you suggest how to work with
    dataset ?
    Best regards

     
    Guest, Mar 17, 2006
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.