This question is locked. New answers and comments are not allowed.
I have an insert form above a grid, what I'm trying to accomplish is this:
1. have the grid loaded on page load via server.
2. After the form submits its request to the server via an ajax call rebind the grid showing the updated data.
Is this possible? Could i just call this on view in a js method
then on controller call the following
This seems to not rebind my grid. Thoughts?
Thanks in advance.
1. have the grid loaded on page load via server.
2. After the form submits its request to the server via an ajax call rebind the grid showing the updated data.
Is this possible? Could i just call this on view in a js method
$.ajax({ url: '<%= Url.Action("GetDataColumns", "Ajax") %>', type: "POST", data: "dataSetId=" + _dataSetId, success: function (dcs) { var grid = $('#ColumnsGrid').data('tGrid'); grid.dataBind(dcs); } });then on controller call the following
[GridAction] public ActionResult GetDataColumns(int dataSetId) { List<ActionAlertLib.Classes.ActionAlert.DataColumn> _dcs = ActionAlertLib.Dal.ActionAlert.Load.GetDataColumns(dataSetId); return View(new GridModel(_dcs)); }This seems to not rebind my grid. Thoughts?
Thanks in advance.