Hi,
We are facing multiple issues with Manual CRUD for Multilevel Hierarachy. Here is the scenario that we are working on.
1) ContainerGrid objectiveGrid = new ContainerGrid();
e.Row.RowIslands.Add(objectiveGrid);
we are using this mechanism to create the hierarchy of grids. number of child level grids is not fixed. I can grow to 5-10 levels (we have achieved this structure). Finally we have enabled the cell editing for last level of grid. & written update code in
protected
void onRowUpdating(object sender, Infragistics.Web.UI.GridControls.RowUpdatingEventArgs e) event. It works fine data gets updated into datbase. But this event fires the postback event & the child level grid(which is updated) retains it's old value.
How I can show the updated values in the child level grid? Attaching .aspx * .cs file for your reference.
Please let me know if you need more information on this? It is critical for us to fix this issues ASAP.
any updates on this issue.
Thanks Rado for your thougts,
Regarding Refreshing the grid I used some other approach which is 50% done. what I did is after my custom ajax call is completed which is used to add data in database I am collapsing the parent grid row. so now when I will expand parent row it will automatically fetch the latest record. below is the code for for collapsing the parent row (it is working as well).
//ajax method to update row in database
default_aspx.addRow(param);grid._parentRow._set_populated(false)grid._parentRow._set_expandedInternal(false);
now when I manually expand the parent row it fetch the latest reconrd. but I could not find the way which will automatically fire the expand event i tried keeping ._set_populated(true) & ._set_expandedInternal(true); but it did not work... is there any way i can expand the row at client side?
I tried RowEdit Template but it is not supported for container grid in Manual load on demand. if you have any link which has explained RoeEdit Template please let me know
If you want to expand a row on the client David has already responded here :
http://forums.infragistics.com/forums/p/36693/212649.aspx#212649
Hope this helps you.
Thanks Rado,
As I mentioned in my earlier thread I have already tried the option suggested by David & it gives me some javascript error. You can check this issue with the code sample that I have already provided in my previous thread.
Please replace onClientClick(gridId) in default.aspx as follows.
function onClientClick(gridId) { var grid = $find(gridId.id); var arry = new Array(); var param = ""; var key = ""; var value = ""; categoryID = grid._parentRow.get_dataKey()[0]; param = categoryID; //+ "&goalid=" + goalId; for (var i in grid.get_behaviors().get_editingCore().get_behaviors().get_rowAdding()._row._cells) { arry[i] = grid.get_behaviors().get_editingCore().get_behaviors().get_rowAdding()._row._cells[i].get_value(); key = grid.get_behaviors().get_editingCore().get_behaviors().get_rowAdding()._row._cells[i]._column._key; value = grid.get_behaviors().get_editingCore().get_behaviors().get_rowAdding()._row._cells[i].get_value(); //param = param + "&" + key + '=' + value; param = param + "&" + value; } default_aspx.addRow(param);
//collapse the parent row grid._parentRow._set_populated(false) grid._parentRow._set_expandedInternal(false); //This line is not working
grid._parentRow.set_expanded(1); }
Hi Rado,
any updates on this?
HI Nikhil,
You are correct. There is a javascript issue. So, the good news is that I've tested your code with the latest service release for your version - 9.2.20092.2137 and it works as it should be. I would suggest keep the David's approach and go ahead and download the mentioned service release and upgrade.
Thanks