473,386 Members | 1,706 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,386 software developers and data experts.

asp:table remembering state!?

I have an asp.net table which I am populating with controls dynamically at
runtime. The controls themselves get/set values in a datatable which is
stored in viewstate over postbacks. Here is basically what I am doing:

pull datatable out of viewstate

for each row in datatable
create tablerow
create tablecells
create controls
get data items from datatable and place the values in the controls
add controls to tablecells
add tablecells to tablerow
add tablerow to asp table

draw the control

I save values back to the datatable in a similar way, but instead scroll
through the rows in the asp table and place the values in the appropriate
datatable item.
This all works fine, but the problem is with deleting a row. I simply delete
the desired row from the datatable and then call my table creation method
described above. This should surely mean that the asp table will not display
the row as it no longer exists in the datatable. But what happens is that a
row is deleted, but all the ones below it "bubble up" in that they take on
the previous rows value. So it seems as if the bottom row has been removed.
I've checked my datatable and the values in here don't correspond with whats
being displayed. Is there some form of caching going on that I'm not seeing?
ViewState is turned off for the asp table and hence all of its controls.

Any ideas?!!!

(p.s. sorry for the long description, but I thought I'd try and give you a
clear picture of whats going on)

Nov 19 '05 #1
0 1227

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

Similar topics

0
by: Rich | last post by:
Ok here is what I am doing. I have a <asp:Table object in the html. I am creating the rows and cells dynamically in my codebehind. When I first call the aspx page I create the table based on...
0
by: Stephen | last post by:
I have been getting on well with help from this forum trying to create an array list and work with it. Everything is working fine apart from displaying my array list items into the labels in my...
2
by: Kevin | last post by:
I am just learning asp.net and ran into a problem that I have not been able to resolve. I have a web form with an html table that houses an asp:label, asp:textbox and asp:button within. I had the...
3
by: Maria | last post by:
Hi I have a asp:table that I want to hold the values between postbacks. Hope some one knows how I can get that to work in an easy way. The table is loaded in runtime with different textboxes....
3
by: gb | last post by:
We are in the process of upgrading part of a large system to .NET, whilst the majority will remain ASP. Sharing session state information will not be a problem at the moment as it is trivial and...
3
by: Marty McDonald | last post by:
I have <asp:Table... </asp:Table> on my webform. In codebehind, I populate a DataTable whose data should appear in the asp:Table. I created my own code to populate the asp:Table with the...
4
by: coleenholley | last post by:
I asked the question yesterday: > HI All :-) > > I don't know if I will be able to do this type of formatting, but what I > need to do is have a table row where the text wraps (This is easy)...
4
by: Nathan Sokalski | last post by:
When editing an ASP Table, Visual Studio does not allow me to edit it in Design View. This makes it harder to add elements, because I must add every element either by using Design View to create...
2
by: clickon | last post by:
I am confused about the way in which asp:table objects work. When a control is within an asp table it generally appears to be in the scope of the tables parent control. E.g. if i have a page that...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.