Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
335
Grid PostBack Client Event
posted

The last column on a child grid is a delete link, however I only want this link visible if the row was added within the last five minutes (for security purposes). So far I have the following code  working in the rowsExpanded Event. However, if the user makes a change to the grid, causing a grid update, the information is lost.

I can't do this code in the pageLoad because when a grid is updated, the page is not reloaded

Is there any client event that is triggered when a grid does a post back/update? Or is there another way to accomplish this?

var index = eventArgs._props[0]._index;

var grid = ig_controls["ctl00_ContentPlaceHolder1_WebHierarchicalDataGrid1"].get_gridView();

var gridrow = grid._rows._rows[index]

var rowislands = gridrow.get_rowIslands();

var childGrid = rowislands[0];

var totalrows = childGrid._rows._props[0];

for (counter = 0; counter < totalrows; counter++) {

var transdate = childGrid._rows.get_row(counter).get_cellByColumnKey("TransDate").get_value()

var Now = new Date();

diff = transdate-Now

if (diff > -300000) {

var value = childGrid._rows.get_row(counter).get_cellByColumnKey("Delete").get_element()

value.children[0].style.display='block'

}

Parents
  • 2535
    Offline posted

    Hello,

    Thank you for posting on our forums.

    You can try to use the client event AJAXResponse, this event is called after the grid gets Ajax response from the server.

    Please let me know if I can provide any further assistance

Reply Children
No Data