After data is entered and I press the enter key, the page does a postback and the record is not saved to the grid or the database.
<ig:RowAdding> <ColumnSettings> <ig:RowAddingColumnSetting ColumnKey="Row_ID" ReadOnly="True" /> <ig:RowAddingColumnSetting ColumnKey="Row_ID_Hyperlink" ReadOnly="True" /> <ig:RowAddingColumnSetting ColumnKey="Member_ID" /> <ig:RowAddingColumnSetting ColumnKey="Member_Name_LF" ReadOnly="True" /> <ig:RowAddingColumnSetting ColumnKey="DOS" /> <ig:RowAddingColumnSetting ColumnKey="BMI" /> <ig:RowAddingColumnSetting ColumnKey="Percentile_Flag" /> <ig:RowAddingColumnSetting ColumnKey="Weight_in_Lbs" /> <ig:RowAddingColumnSetting ColumnKey="Approved_Flag" /> <ig:RowAddingColumnSetting ColumnKey="Documentation_Scanned_Flag" /> <ig:RowAddingColumnSetting ColumnKey="Comment" /> </ColumnSettings> <EditModeActions EnableOnActive="True" EnableOnKeyPress="True" /></ig:RowAdding>
Hello Angela,
Could you please try to set to <ig:RowAdding Enabled="true">
I'm looking forward your reply.
Best regardsAleksandar KamenovAssociate Software Developer.
It seems to be tied to BatchUpdating being set to true. When it's set to false, the new record is added successfully, but when it's set to true, pressing enter causes a postback and the record is not saved.
I want to point out that BatchUpdating is used for reducing the postbacks. So if you have BatchUpdating set to True you will need to trigger manually a postback which in the background OnRowUpdating event you will be able to refer to the modified data and respectively update your dataSource with the new one.
Before you take action please refer to the links that I've provided.
If you have further questions, please let me know.
Thank you for the code you have sent.
Using your code I have created a sample and tested it. I was unable to reproduce the issue. You can find the sample as an attached file using the Northwind database with several commands defined. I have tested adding new rows with and saving them.
Please, open the sample and modify it to reproduce the issue you are describing and sent it back to me. Having this information will help me to investigate this further.6710.WDG_BatchUpdating.zip
I have attached the file. Thank you for taking the time to look at it.
abc.zip
In order to investigate further the behavior you are describing, the best option will be if you can isolate it in a small project and send it. This sample will help to debug and test what is causing this.
As an option you can also send the .aspx and the aspx.cs files from your project as a .zip file.
It is making it to the RowAdding event, but not the RowAdded.
When BatchUpdating is set to true, and the user is editing an existing row, I have them press enter or tab out to make the edit to the grid, then they press a "save" button to commit the data to the database. This seems to work fine on rows that already exist. I have always used BatchUpdating with the WebDataGrid and have never had an issue with the existing rows or adding new rows to the grid. It's not making sense to me what is causing the grid to do a postback just because I set BatchUpdating to true. When I set it to false, I am able to enter the new record and hit the enter key and it is saving correctly with no postback. Then, I set BatchUpdating to true and enter the new record and hit the enter key and the page does a postback and the new record disappears and does not save.Has something changed? I'm using 17.2.