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
200
Getting Isuue in igHierarchicalGrid with MVC 4 with Razor sytex.
posted

Hi,

i am using MVC igHierarchicalGrid VS 2012 framework, i am getting issue when i am clicking any cell and changing the content.

i am expecting the control will hit EditingDataSetMvcHelper() method. but it's not working.

i am new to Ignite can any one help me on this.

My requirement is i want to load and edited content on my controller in MVC.

Updateurl(Url.Action("editing-dataset"))

[GridDataSourceAction]
[ActionName("editing-dataset")]
public ActionResult EditingDataSetMvcHelper()
{
var categoriesProducts = this.CategoriesProducts;
return View("editing-dataset", categoriesProducts);
}

Below Sample code is working fine for Load:

@(Html.Infragistics().Grid<System.Data.DataSet>()
 .ID("grid1")
 .Width("100%")
 .AutoGenerateColumns(true)
 .AutoGenerateLayouts(true)
 .Features(features =>
 {
      features.Paging().PageSize(5).Type(OpType.Remote).Inherit(false);

      features.GridEditing().EditMode(GridEditRow.cell);
      features.Selection().Mode(SelectionMode.Row).MultipleSelection(true);
      features.Hiding().Inherit(true);
 })

 .PrimaryKey("ID")
 .DataSource(Model)
 .DataSourceUrl(Url.Action("dataset-binding"))

 .Updateurl(Url.Action("editing-dataset"))

 .DataBind()
 .Render()

Controller Code:-Debugger is hitting this method on load

[GridDataSourceAction]
[ActionName("dataset-binding")]
public ActionResult DataSetMvcHelper()
{
  var categoriesProducts = this.CategoriesProducts;
  return View("dataset-binding", categoriesProducts);
}

Is there any thing i am missing or any other approach to achieve this functionality.

 

Parents
No Data
Reply
  • 29417
    Offline posted

    Hello niteshghosh , 

    Thank you for posting in our forum. 

    By design the changes are not  directly committed to the server until the “saveChanges” method is called for the grid. For example:

                        $( "#grid1" ).igHierarchicalGrid( "saveChanges" );

    Until the saveChanges method is explicitly called, no request will be made to the server.

    Once the method is called a request will be made to the url set in the UpdateUrl setting of the grid.

     

    You can refer to the following example here:

    http://www.igniteui.com/hierarchical-grid/editing-dataset

     The “saveChanges” method is called on the button’s click event and only then a request is made to the server to update the data.

     Let me know if  you have any questions.

     

    Best Regards,

    Maya Kirova

    Developer Support Engineer II

    Infragistics, Inc.

    http://es.infragistics.com/support

     

Children