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 969205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:36:30+00:00 2026-05-16T02:36:30+00:00

I have setup a DataGrid with a number of columns and a checkbox and

  • 0

I have setup a DataGrid with a number of columns and a checkbox and column at the end of the row.

I am also changing the layout of the datagrid on the OnItemCreated event which changes the layout of the datagrid by expanding the rows with the “Rowspan” attribute and remove the extra columns and controls where they are no longer required.

The original datagrid layout was setup like this:

___________________________________________
| 1 | Employee Name | 01/08/10 |[] |[SAVE]|
| 1 | Employee Name | 02/08/10 |[] |[SAVE]|
___________________________________________
| 2 | Employee Name | 01/08/10 |[] |[SAVE]|
___________________________________________
| 3 | Employee Name | 04/08/10 |[] |[SAVE]|
| 3 | Employee Name | 05/08/10 |[] |[SAVE]|
| 3 | Employee Name | 06/08/10 |[] |[SAVE]|
___________________________________________
| 4 | Employee Name | 03/08/10 |[] |[SAVE]|
___________________________________________

And now it looks like this with the rows expanded, the controls removed and the datagrid columns deleted…

___________________________________________
| 1 | Employee Name | 01/08/10 |[] |[SAVE]|
|   |               | 02/08/10 |   |      |
___________________________________________
| 2 | Employee Name | 01/08/10 |[] |[SAVE]|
___________________________________________
| 3 | Employee Name | 04/08/10 |[] |[SAVE]|
|   |               | 05/08/10 |   |      |
|   |               | 06/08/10 |   |      |
___________________________________________
| 4 | Employee Name | 03/08/10 |[] |[SAVE]|
___________________________________________

The page displays when opened, and the paging control works as expected each time a user clicks on a page number.

However, when I click on the [SAVE] button for a particular employee, an error message shows a message similar “Invalid Postback or Callback”. I understand that this is a result of the controls and columns that I have removed in the datagrid and the event validation does not match the orignal rendered items.

I do not want to remove the EnableEventValidation because it is a security issue.

I know I have to use the Render method to fix any changes that I have made before the page is displayed, but how do I resolve this postback issue?

  • 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. Editorial Team
    Editorial Team
    2026-05-16T02:36:31+00:00Added an answer on May 16, 2026 at 2:36 am

    Ok, lets see where the error comming from.

    The GridView is use the __DoPostBack() javascript call and have no input by him self. So by him self is not send any input data from other cells.

    Now I think that you do not have made custom DoPostBack calls – right ?

    The second point that there is a validation is on ViewState Data.

    Is by any change to use any UpdatePanel and in the middle you make any update that change this ViewState ?

    What I suggest you to try is to send EnableViewState=”false” on your GridView To see if you still get this error. This is not affect you because GridView in every update re-read the data that needs to created.

    And the second point that you need to check, is the point that you change your data and afect the view state. Maybe by place it in other point solve the issue. From example if you have it on Page_Load maybe you need to move it on PageInit – or vise versa.

    Hope this help.

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

Sidebar

Related Questions

I have setup mappings for a number of classes, however in some scenarios I
I have a datagrid which is populated with CSV data when the user drag/drops
I have a DataGrid and I want to populate a column that contains a
I have a SL DataGrid that has two columns. I need to be able
I have a data grid that looks like this <tk:DataGrid ItemsSource={Binding Parents} AutoGenerateColumns=False> <tk:DataGrid.Columns>
I have setup a basic WCF client/server which are communicating via Named pipes. It
I have 2 silverlight controls on a form; datagrid which is bound to list
I have a Many to Many mixed with some Master-Detail DataGrid setup. 4 DataGridView
I'm trying to setup a DataGrid that contains a column of combo boxes. The
I have a Datagrid in which I use a TextColumn bound to an Integer

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.