Hi All,
I have an ultrawebgrid with virtual scrolling ajax. I select one record and change in in a modal popup window, then when I return from the modal i would like to trigger a
gridLCN.invokeXmlHttpRequest(gridLCN.eReqType.Refresh,
null, "");
but I want only the current row to be refreshed and not the whole grid. I don't want change cell by cell in grid but trigger a refresh only of that row so I don't lose the scroll position of the grid nor it send me to the first record of the grid.
Any ideas are appreciated.
Hello Federico,
You can specify what kind of request to be issued to the server check that out :
eReqType.UpdateCell - the cell that is being updated;
eReqType.AddNewRow - the rows collection a new row is added to;
eReqType.Sort - the rows collection that is being sorted;
eReqType.ChildRows - the row which child rows are requested;
eReqType.DeleteRow - the row that is being deleted;
eReqType.UpdateRow - the row that is being updated.
eReqType.Filter - the rows collection the filter is being applied to;
eReqType.FilterDropDownFill - the rows collection the filter is being
If you want to issue the request from code running on the child window you can access the parent window through opener.grid.invokeHttpRequest()……
Please refer the client side object model:
http://help.infragistics.com/NetAdvantage/ASPNET/2010.3?page=WebGrid_Object_CSOM.html
Hope this helps.
Hi Rado,
Thank you for your reply.
This is that the that I have a grid with vritual scrolling, ajax, then the user scrolls down and the grid pulls automatically more rows from the server as the user scrolls down, then the user clicks on q templated field "Edit" of a specific row and I open that record in a modal window, then the user changes and saves the record which updates the server. When the user hits the save button I window.close and return to the main screen where the grid is, thing is that I don't want to return the values form the modal window and change the grid row in javascript by changing cell by cell, but instead I would like to trigger a "refresh row" so the grid pulls the updated row from the server and refreshes only that row, in this way I don't lose the current position of the grid and the row gets refreshed.
Would the UpdateRow Method do what I need?, Could you please provide a line with an example of the eReqType.UpdateRow ?
This is my Edit Sub in JavaScript.
function EditLCN_Click() { var row = gridLCN.getActiveRow(); var rowlcn = row.getCellFromKey("Local Composition Number").getValue(); var aLCNArgs = new Array(_txtcurrentuserLCN.Element.value, rowlcn); var currentbackground = document.bgColor; document.bgColor = '#CCCCCC'; var myRand = rand(50000); returnValue = window.showModalDialog('EditLCNv2.aspx?s=' + rowlcn + '&v=a' + '&rand=' + myRand, aLCNArgs, 'resizable=yes;unadorned=no;scroll=yes;status=no;dialogWidth=1008px;dialogHeight=700px;'); document.bgColor = currentbackground; if (returnValue != false) { // _txtoperationsmessage = returnValue; gridLCN.invokeXmlHttpRequest(gridLCN.eReqType.Refresh, null, ""); //but this refreshes the whole grid and makes the grid jump to the first row... } return false; }
Many thanks
Federico.