DetailsView with Dataset

G

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
 
G

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>
 
G

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

Phillip Williams said:
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>

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com


Maurizio Poletto said:
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
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top