Solved

Datatable reset

Posted on 2011-03-03
2
372 Views
Last Modified: 2012-05-11
When pageload the first time, it looks fine. The second time, it keeps adding "- test" to column_tmp. How can I reset my_table the second time it reload?
pageload

my_table is datatable


 

For Each column As DataColumn In my_table.Columns

                Dim column_tmp As String = column.ColumnName
                Dim RequestAs String = Get_data(Session("test"), column_tmp)

                If RequestIsNot Nothing Then
                    my_table.Columns(column_tmp).ColumnName = Request_columnname
                   
                Else
                 
                    my_table.Columns(column_tmp).ColumnName = column_tmp &  " - test"
                           
                End If
Next
0
Comment
Question by:VBdotnet2005
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 13

Accepted Solution

by:
agarwalrahul earned 500 total points
ID: 35033605
You Session("test") Expires every page load please check this and to reset datatable use DataTable.Reset() command.
0
 

Author Comment

by:VBdotnet2005
ID: 35033693
Can I do this?
Dim my_table as datatable
my_table.reset()
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question