473,396 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

DetailsView with Dataset

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

Mar 16 '06 #1
2 1924
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" wrote:
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

Mar 16 '06 #2
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" wrote:
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" wrote:
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

Mar 17 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Eric Zhao | last post by:
My details view is in insert mode and my dataset is empty but the details view doesnt show. who can help me, how to do? Also I tried to set the defaultmode to insert mode, but i found i can't...
2
by: Andrew Robinson | last post by:
Is there any way to accomplish two way data binding in a Details View with a DataSet or DataTable as the DataSource. All I want is to get an updated DataSet or DataTable back from the...
12
by: Jim Hammond | last post by:
I am passing the whole object instead or parameters in my select and update methods. I can get the updated object if I set UpdateMethod, let ASP.NET autogenerate an update button, and then press...
3
by: CWWong | last post by:
I am using DetailsView using ObjectDataSource with DataSourceTypeName assigned to the specific class. SelectMethod, UpdateMethod and DeleteMethod is working successfully, except InsertMethod. The...
2
by: Dave | last post by:
I have a detailsview connected to a SqlDataSource. I have a button on a form that needs to take some of the data from the detailsview and do some stuff with it. Is there anyway to get the data from...
0
by: Spotnick | last post by:
When I found out about the detailsview control, I thought it would save me a lot of time when doing basic table updates. All my business logic layer uses strongly-typed datasets, and I did plug a...
2
by: Curious Trigger | last post by:
Hello, if have an asp.net web page with a detailsview. This detailsview uses a sqldatasource connecting to a sql server 2005 database with a select statement simliar to this one: SELECT...
1
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Hi, I am a newbie to ASP.NET 2.0. This is driving me nuts! I think I might have a fundamental misunderstanding of how this all works! I am using a DetailsView which is populated dynaically at...
3
by: Martin Frey | last post by:
Hello guys, im new to asp.net and im trying to get me used to it. I've managed to create webpages with detailviews, databinding and datasources. Adding or inserting data went very well and, after...
3
by: Nick Bennett | last post by:
I've got a page with a DetailsView. It uses a SqlDataSource which itself uses stored procedures for Select and Update. I don't want the user to see some of the columns, but if I don't bind them...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.