Hello,
I'm testing the MVC Hierarchical grid with the following code. I can't edit the child rows and I can't select one child row, it selects all the child row.
@(Html.Infragistics() .Grid(Model) .ID("igGrid") .AutoGenerateColumns(false) .PrimaryKey("ID") .Features(f => { f.Updating().EditMode(GridEditMode.Row); }) .UpdateUrl(Url.Action("CfgCatalogsSaveData")) .Columns(column => { column.For(x => x.ID).HeaderText("ID"); column.For(x => x.Name).HeaderText("Name"); }) .ColumnLayouts(layouts => { layouts.For(x => x.CfgCatalogItems) .PrimaryKey("ID") .AutoGenerateColumns(false) .AutoCommit(true) .Columns(childcols1 => { childcols1.For(x => x.ChoiceValue).HeaderText("Valeur"); childcols1.For(x => x.Label).HeaderText("Texte"); childcols1.For(x => x.Congruent).HeaderText("Compliant"); }) .Features(g => { g.Updating().EditMode(GridEditMode.Row); }) ; })
.DataBind() .Render())
Best regards,
Alain
Hello Alain,
I am sorry, the issue is indeed easily reproducible when adding rows. I logged it as a bug with #228032 in our internal tracking system. A support case is created on your behalf with number CAS-178264-M9B4Q9, so that you can be notified when the bug is fixed. You can find your active cases under Account - Support Activity in our website. Select your ticket and go to Development Issues tab to view the status of related bugs.
I also managed to work around the issue using the rowAdding event for child layouts. I am attaching an updated sample. I hope this helps unblocking your from working on your application while a fix for the bug is being developed.
Stamen Stoychev
Hello Stamen,
It's exactyl my scenario.
I made a test, I added a child row in the CfgCatalogID 1, and as you can see in the attached screenshot, the CfgCatalogID is at 0.
Regards,
In the code you provided the CfgCatalogID property is defined as a column for the child layout so the grid is certainly aware of it as long as it's populated correctly in your model. I did a test on my own using as much from your code as possible and the property was certainly available in the Transaction.row members in the transactions2 list. I am attaching my sample for your reference.
If it is not representative of your scenario, please apply any changes you feel necessary so I can take another look.
First point solved with the autocommit to false.
Concerning the parent row ID, in the Transaction.row, there is the object CfgCatalogItem with a property CfgCatalogID, but this property is defined in my class and the grid don't know it must to set it with parent row ID.
public class CfgCatalogItem { public int ID { get; set; }
public int ChoiceValue { get; set; }
public string Label { get; set; }
public bool Congruent { get; set; }
public int CfgCatalogID { get; set; }
public virtual CfgCatalog CfgCatalog { get; set; } }
I have the last version of the Ignite UI (16.1.20161.2145).
The modified styles are applied to rows the changes for which are not yet committed locally. Your child layout uses auto-committing (.AutoCommit(true)) which means that all changes are committed as they come and the rows are never painted as modified. Disabling auto-committing allows for transactions rollback, as well as for aggregating them.
As for the other issue - the parent row ID is not part of the Infragistics.Web.Mvc.Transaction object for the HierarchicalGrid. However, it should be available in the CfgCatalogItem object available in Transaction.row if it exists as a property of CfgCatalogItem. If this is not the case, please let me know which Ignite UI version you are using so I can investigate this further.