Hello!
How to get the data from the row meant for addingRow on the server side and not from rowAdding event?
this.WebHierachicalDataGrid1.Behaviors.EditingCore.Behaviors.RowAdding.Row returns null if it's not in the events connected with rowAdding.
Thnaks in advance.
Ok,
this.WebHierachicalDataGrid1.GridView.Behaviors.EditingCore.Behaviors.RowAdding.Row
works for the rootBand. But then while I'm trying to get the cellValue like this -
Infragistics.Web.UI.GridControls.GridRecordItem userName = rowToAdd.Items.FindItemByKey("UserName");
userName's Text property is "", though that cell of add row is not empty and even defaultValueAsString is also set not to "".
Hi Andrey,
It seems that it's not possible to get these values outside of the RowAdding event. However, you could workaround it by placing the values from the new row in hidden fields on the page. Then you should be able to access them on the server. You can get the values from the row to add like this:
var grid = $find("WebHierarchicalDataGrid1");
var rowToAdd = grid.get_gridView().get_behaviors().get_editingCore().get_behaviors().get_rowAdding().get_row();
var cell2Value = rowToAdd.get_cell(1).get_value();
Let me know if you have any questions regarding the matter.
Hello Nikolay,
that works beautifully! Thank you. Sorry, just one more question -
If I change the value of the checkBox in the checkBox column (not in the header, just any checkBox in the column) in which clientside event should I commit editing (I do it like this:
var grid = $find("WebDataGrid1");var editing = grid.get_behaviors().get_editingCore();editing.commit();
)
so that in rowUpdating on the server side (which is called because of editing.commit()) I can already see the new value of the checkBox?
I tried to do that in CellValueChanged clientside handler, but then in rowUpdating the value is still the old one
You should be able to get the updated values from the RowUpdatingEventArgs of RowUpdating event - for example: e.Values["Name"]. It does not matter where you are calling commit() function.
Thank you, everything works pretty nice!
I'm glad I could help.
Feel free to contact me if you have any other questions.
It turned out that yes... But it concerns more WebDropDown so I posted it here http://es.infragistics.com/community/forums/p/74631/377250.aspx#377250
Hi,
I'm posting one more issue link here hoping that someone would see - there I haven't been answered for a week already and that issue is crucial for me. http://es.infragistics.com/community/forums/p/74746/378495.aspx#378495