Symptoms
Scenario:
one of the list view need to dynamically add or remove item based on many dropdown list on the top of the form. What i get is when I change the dropdown list, the browser will navigate to the listview below as it is adding make changes.
Query:
How do i maintain the screen at the dropdown list while the changes is being made to the list view below?
Diagnoses
When a new row is being added to a list, the list is expecting some sort of input from the user for the new row. That is why the form will automatically scroll down, as the focus is on the textboxes that appears with the new row.
Resolution
You can try the following:
1. Check out and edit your editable list view
2. Under 'Add/Edit Item', select each of the controls in that row and uncheck the Visible property
3. Check in the editable list view
Test your form and see if it still scrolls down. The reason why your form will scroll down is because when you attempt to add a new row, the 'Add/Edit Item' row will appear at the bottom of the list. This is to allow users to manually input the values they want to add to the list. Hiding the controls should prevent the form from scrolling down.
However, do note that the above will only work if you are not expecting users to manually modify list. If the users are allowed to manually modify the list, they will not able to do so if the controls are hidden. If you also want to allow users to manually modify the list, you can try changing your rules to:
a. Change the Visible property of the 'Add/Edit Item' controls in the editable list in order to hide it
b. Add row
c. Transfer data to add/edit row
d. Apply changes to view
e. Reverse the Visible property of the 'Add/Edit Item' controls in the editable list to make them visible again