Hi,
I'm probably trying to do something that is achieved in a better way but this is what I'm trying to do.
I have a page with several controls and grids that is used for an edit for something else. The page is populated with data from a business object and certain properties are data bound. What I'm trying to do is making changes on the page and then hit a save button which will then postback and I'll read all the data from the controls and save in one hit.
The issue I have is the grid. I'm able to remove the items in the grid client side
This works fine but when I click on the save button which is just posting back the grid object on the server side still has the objects I have deleted in it. Other controls on the page which I'm changing as well have the updated values so it's just the grid that does not reflect the changes I make client side.
So is there a way I can make the grid pass it's client side state back in the same way other controls do.
I'm probably trying to do something that is achieved in a better way but this is what I'm trying to do.
I have a page with several controls and grids that is used for an edit for something else. The page is populated with data from a business object and certain properties are data bound. What I'm trying to do is making changes on the page and then hit a save button which will then postback and I'll read all the data from the controls and save in one hit.
The issue I have is the grid. I'm able to remove the items in the grid client side
function butConditionRemove_OnClick(grid) { //grid is the clientid of the grid var MyGrid = $find(grid); var MasterTable = MyGrid.get_masterTableView(); var selectedRows = MasterTable.get_selectedItems(); for (var i = 0; i < selectedRows.length; i++) { var row = selectedRows[i]; if (confirm("Are you sure you want to delete the selected entry?")) { var table = MasterTable.get_element(); var rowtmp = table.rows[row.get_element().rowIndex] table.deleteRow(row.get_element().rowIndex) var dataItem = $find(rowtmp.id); if (dataItem) { dataItem.dispose(); Array.remove($find(grid).get_masterTableView()._dataItems, dataItem); } MyGrid.repaint(); } } }This works fine but when I click on the save button which is just posting back the grid object on the server side still has the objects I have deleted in it. Other controls on the page which I'm changing as well have the updated values so it's just the grid that does not reflect the changes I make client side.
So is there a way I can make the grid pass it's client side state back in the same way other controls do.