DataGrid Button - Invalid Answer or Callback

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

I also change the layout of the datagrid in the event OnItemCreated, which changes the layout of the datagrid by expanding the rows with the Rowspan attribute and removing extra columns and controls where they are no longer needed.

The original datagrid layout was configured as follows:

___________________________________________
| 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 when rows are expanded, controls are removed and datagrid columns are 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 is displayed when it is opened, and the paging control works as expected every time the user clicks on the page number.

, [SAVE] , , "Invalid Postback Callback". , , datagrid, , orignal.

EnableEventValidation, .

, Render , , , ?

+2
1

, , .

GridView javascript- __DoPostBack() . , .

, DoPostBack - ?

, , - ViewState Data.

- UpdatePanel, - , ViewState?

, EnableViewState = "false" GridView. , . , GridView , .

, , - , . , . , _Load, , PageInit - .

.

0

Source: https://habr.com/ru/post/1759063/


All Articles