473,405 Members | 2,287 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,405 software developers and data experts.

ASP DataSet - Strange problem

Hi,

What happend:
- PageLoad ()
{
dataset.Clear ();
dataadapter.Fill (dataset);
datagrid.BindData ()..
}

Ok,

oButtonClick()
{
changing sql statment
dataset.Clear ();
dataadapter.Fill (dataset);
datagrid.BindData ()..
}

Next

Displayed data is ok, but when I am getting cellvalue - it returns value
from previous query ,
but displayed data is ok ,

for example

datagrid
after fist fill it has 15 records,
after second 5
dataset has 15 and also 15

Please help i dont know what is going on!

Hyde

Jun 27 '06 #1
1 992
page load is called on the render and the postback. so when the button click
happens, your page load code is overwriting the postback value. use the
handy IsPostback property to control logic in the page load.

if you turn viewstate off, then you must load the grid manually (as a copy
is not saved in viewstate), but it must be done in the OnInit event so that
the generated controls exists to get their postbackdata events.

-- bruce (sqlwork.com)
"mr.Hyde" <ga******@poczta.onet.pl> wrote in message
news:e7**********@news.onet.pl...
Hi,

What happend:
- PageLoad ()
{
dataset.Clear ();
dataadapter.Fill (dataset);
datagrid.BindData ()..
}

Ok,

oButtonClick()
{
changing sql statment
dataset.Clear ();
dataadapter.Fill (dataset);
datagrid.BindData ()..
}

Next

Displayed data is ok, but when I am getting cellvalue - it returns value
from previous query ,
but displayed data is ok ,

for example

datagrid
after fist fill it has 15 records,
after second 5
dataset has 15 and also 15

Please help i dont know what is going on!

Hyde

Jun 27 '06 #2

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

Similar topics

0
by: Babu Mannaravalappil | last post by:
(This is a cut-and-paste) of one of my previous posts. Since I did not get any help, I thought may be I should re-post it anew. Sorry!!) Environment: Visual Studio Enterprise 2003 DotNET 1.1...
3
by: Bill C. | last post by:
Hi, I've got a simple console app that just reads an XML file into a DataSet then prints out a description of each table in the DataSet, including column names and row values for each column. ...
1
by: Krzysztof Karnicki | last post by:
I have such a problem… I have create my custom DataGridColumn inheriting from System.Windows.Forms.DataGridColumnStyle on using it on DataGrid, to show rows painted by me self. Because dates ...
14
by: Lars Netzel | last post by:
A little background: I use three Datagrids that are in a child parent relation. I Use Negative Autoincrement on the the DataTables and that's workning nice. My problem is when I Update these...
16
by: Geoff Jones | last post by:
Hi Can anybody help me with the following, hopefully simple, question? I have a table which I've connected to a dataset. I wish to add a new column to the beginning of the table and to fill...
3
by: AH | last post by:
Hi all, I noticed this strange behavior; I created a new control (example inherits from textbox) and add a new property, then I bind this new property to a field in my dataTable in a dataSet....
1
by: John Young | last post by:
Hi, I have a strange problem with returning a dataset from a webservice. Here's some code... The error I get at compile time is. "Cannot convert type 'void' to 'System.Data.DataSet'" Can...
9
by: Kevin Hodgson | last post by:
I'm experiencing a strange Dataset Update problem with my application. I have a dataset which has a table holding a set of customer information records. (address, contact, info, etc.) I have a...
5
by: xarky1984 | last post by:
Hi, I am using Visual Studio 2005 and has a problem with DataSet Designer. While I was using Visual Studio, 'A Package Load Failure Error' was given. Visual Studio terminated and when...
8
by: Harry Strybos | last post by:
Visual Studio 2005 - SP1 - VB.Net on WinXP SP2 I add a typed dataset to my solution and get the following errors : Error 1 sub 'ReadXmlSerializable' cannot be declared 'Overrides' because it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.