Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
300
WHDG - Outlook GroupBy - Cell editing issues. Please Help! Urgent!
posted

Hello,

I have a very simple WHDG with Outlook GroupBy. There is only one level of data with group headers.

There are 3 visible columns, 2 of which are editable. The WHDG is bound to a WHDataSource which uses an Object DataSource with Select and Update methods. AutoCRUD is enabled. RowUpdating event is bound. Within the WHDG, the only edits allowed are updates to the 2 columns. No row additions or deletions are allowed. Row Selection is disabled too. Essentially, it is a form with grouped headers.

I have also bound the RowUpodated event and the AJAXResponse client side event to display a running summary of what has been entered in a webdialog on the page. Disabling/deleting both of these does not help fix the following issues.

I initially tried using EditorControls (numeric) for the 2 columns that need editing, but, to isolate the issue I am facing, I have deleted them and am just using the basic cell editing functionality.

I have the following 3 issues:

1. Even without grouping, when I use autoCRUD, the AJAX update is triggered only when row focus changes. Since I have 2 editable columns, editing one column and tabbing over to the 2nd columns in the same row (or using the mouse to activate the cell in the second column) does NOT trigger an AJAX update. (Kinda makes sense since the event is called RowUpdating). However, I need to trigger RowUpdating after any cell is edited. How do I achieve this?

2. With Grouping enabled, the AJAX Update (RowUpdating event) is only triggered for every other row! So, with 2 editable columns and say, 6 rows in a group, I click on the first row, first editable column, change the value and click on the same column in the 2nd row. RowUpdate fires just fine (with the AJAX indicator too). I then change the value there and click on the same column in the third row. RowUpdate does not get triggered!. When I click on the same column in the 4th row and update the value, RowUpdate triggers and updates the backend datasource with both values (row 3 and 4). This behavior continues even between groups (say, last row in Group 1 does not trigger RowUpdate, but, subsequently updating the first row in Group 2 triggers RowUpdate for both rows.). The only pattern is that it is for every other row that is edited. My editing does not have to be sequential. If I edit rows 2, 5, 9, 11 and 20, RowUpdate fires after editing rows 2, 9 and 20. Instead of troubleshooting this, I am thinking that if I can trigger/call RowUpdating after any cell is edited, it will take care of this problem. If so, the solution for both issues is the same. Please advise.

3. When I have my RowUpdated event and AjaxResponse client-side event in place (the code in the AjaxResponse event gets the text from GridResponse and sets the innerHTML of a label in a WebDialog on the same page), after the script in AJaxResponse sets the value in the WebDialog, it doesn't return focus to the activated cell in the WHDG. So, for instance, I edit column 1 on row 1 and then click on column 1 on row 4; RowUpdating fires, RowUpdated fires, AjaxResponse gets the new value, sets the innerhtml of the label in the WebDialog and stops. The cell that I had clicked on (row4, col 1) to edit no longer has focus. I have to click on it again to activate it and put it in editing mode. If I disable RowUpdated and AjaxResponse, I don't have this issue. So, at the end of the AjaxResponse script, how do I activate the cell that the user had clicked on? I am thinking that I use the cell-activating client side event, store the row and col numbers in a variable and activate it in the AjaxResponse. Will this work? If so, can I please get a code snippet that will do this. I am having a very hard time working with the CSOM. Putting the WebScriptManager doesn't seem to be helping since I use a MasterPage.

Please help! I am stuck!

Thanks in anticipation.

Parents Reply Children
No Data