Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 173965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T13:26:13+00:00 2026-05-11T13:26:13+00:00

looks like DataTable.Rows property is not saved in ViewState but the Columns property is,

  • 0

looks like DataTable.Rows property is not saved in ViewState but the Columns property is, because I can’t explain why columns persist between postbacks and the data doesn’t. Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T13:26:13+00:00Added an answer on May 11, 2026 at 1:26 pm

    The DataTable class doesn’t store anything at all in ViewState. The DataTable class is not specific for web applications and doesn’t use any web specific features.

    If any data from a DataTable object is stored in ViewState it’s because you are using it as a data source for a web control that is storing information in ViewState, like for example a DataGrid. The control copies the information from the DataTable that it needs to recreate the control on postback. The DataTable object that was used to data bind the control initially doesn’t exist any more once the page is sent to the browser.

    The Columns property of the DataGrid control (for example) is a collection of DataGridColumn objects, it’s not the same as the Columns property of the DataTable class that is a collection of DataColumn objects, eventhough most of the information from the columns of the DataTable is copied to the columns of the DataGrid when the DataGrid is data bound.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What object can I use that has rows and columns, but not DataTable as
I have a untyped DataTable that looks like this (srcTbl): date col_1 col_2 ...
Looks like XSD.exe is not delivered as a part of Visual Studio 2010. what
Looks like the options are Propel, Doctrine, and ActiveRecord, others?, but I am only
Looks like a dumb question, but I tried the following (where Me is a
I have data being returned in a DataTable that looks like: Department | EmployeeName
In a DataTable : I can access all of the DataRow elements like so:
I do not know if there is anything specific with styling JSF datatable but
I have a datatable with few rows each row has few columns. I want
Looks like while( condition ) { //do stuff } is completely equivalent to for(

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.