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 the provided sample, I have managed to start it.
You can perform some kind of check if you are editing the newly added row in order not to add a new one after you update the address. My point is that, when you add new row and start to update it this will cause adding of a new row, and this is not a correct approach. You can check if the updating row is the same as lastly added.
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?
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.
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.
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 & Best Regards,