Hello,
I have a column on the grid which can load cascading. When fire to Itemsrequested event and click "Save" button, I received one row is nothing and one row have full columns but don't have data in them. This affect to some my functions. How to solve this issue?
This is my client function I have used to fire to ItemsRequested event.
function myWDG_EnteredEditMode(sender, eventArgs) { var cell = eventArgs._cell; var row = cell.get_row(); var value = row.get_cellByColumnKey("uEntity_ID").get_value(); if (cell.get_column().get_key() == "Entity_Multiple_Address_ID") { _Payment_Entity_Multiple_Address_DropDownProvider.loadItems(value); } }
I using NetAdvantage version 14.1.20141.2011.
Regards,
Manh
Hello Manh,
Thank you for contacting us!
About the issue I didn't understand the scenario with this save button, could you please isolate a small sample that is reproducing the issue, in order to investigate it further for you. This will be highly appreciated.
Looking forward to hearing from you.
Hello Zdravko Kolev,
Sorry for not replying sooner. I attached small example for you.
This issue seems to come from "AddNewRow" my function. I need add a row to grid after user has changed value of any cells of last row. "AddNewRow" function already place in ExitedEditMode event. When a row has been added, click to "Address" dropdown (fire to ItemsRequested event) and click save button. Although "AddNewRow" only run one time (number of rows on client side is correct) but server side have more than number of rows.
Something is incorrect?
For my scenario, any solution or suggestion?
Thank you for quick replying.
The submit button not only commit my changes of a grid but also save changes of other grids and many fields in my form. When update last row, I need add a new row for my customer purposes. How to fix error that you talking about?
Thank & Best Regards,
This javascript error is not causing the issue, I have found out that I didn't include the xml file data3 into the project. About the 'nothing' row, I don't think that this is the correct way to access rows that are still not committed and AutoCrud is set to true also. The main point of Batch Updating was that you can commit all changes at ones, you will need to make a postback to save it to the database. If you want to get some value from the newly added, updated or deleted rows you will need to use the existing server events for updating, adding, and deleting rows (http://help.infragistics.com/Help/Doc/ASPNET/2012.1/CLR4.0/html/WebDataGrid_Batch_Updating_Events.html).
Please have a look at the article above regarding this.
Also I have noticed that on button click you call a method that will remove the empty row that have been added on the last row data change(RemoveInsertRowNull).
Could I ask you what you want to achieve with accessing the row items? I am asking because I want to be sure that this is the best approach to do it.
The first, please check file "data3.xml" already exists in my project. It located in Data folder (~/Data/data3.xml).
Simple, in my project user can add multiple rows but not post back to server (that similar to Ultrawebgrid). When user click save or submit button, all rows have data changed and many fields on my form will be serialization to XML string for save function. So, I should remove rows null which added by user but not have data in them (RemoveInsertRowNull).
I have tried to use : grid.get_behaviors().get_editingCore().commit() to commit all rows when click save button (only commit, not post back) but still can't solve this issue.
Notice that the most of my grids worked fine except two grids consist DropdownProvider which possible cascading loading.
I can't to use RowAdding, RowUpdating event because when grid sorting I must be save all rows have data changed on grid first but Sorting event fire before RowAdding and RowUpdating fire :(
Please make a sample for me if you possible.
Thank you for the detailed explanation.
About the commit() method, if you call it, a postback to the server will be performed in order to commit the changes, so I don't understand what you mean by saying "only commit, not postback". Could you please confirm that in general the issue is that when you go to the server (after button is pressed) there are more rows than the actual count, and within them the DropDownProviders values are not available, right?
I have added a client event to the button click in order to clear the empty row, because I've noticed that you clear the row only when you enter cell with key "Entity_Multiple_Address_ID". You can find the sample attached.
About the sample that you've requested, you want to have WebDataGrid with cascading dropdowns, and you want to get all rows values (newly added and old rows) server side ?
Thank you for your collaboration Manh.
Hi Zdravko Kolev!
I'm also interested in this situation.
In normal, at server side, the "ColumnSorted" event occurred after the "RowUpdating" event or the "RowAdding" event of WebDataGrid, so we can get edited rows or added rows for updating data then we re-sort grid. But in this scenario, the "ColumnSorted" event occurred before the "RowUpdating" event or the "RowAdding" event, how can we turn those events into order? Or is this an issue in new version?
Warm regards, Huong.
I am still following this case.
Hello Huong,
If you make some change and after that you don't commit it, the sorting wont apply. If you commit the change the grid will databind the new change and sorting will handle it.
Could you please explain me in what scenario this behavior occurs?