My grid looks something like this...
Parcels Parcel Details Parcel Notes.
The notes row is the only row that's editable. Notes can be added and edited, but not deleted.
Everything is working just fine, I can edit notes all day, but ADD is the problem. But to be a valid note, the Parent Parcel ID must be used in the stored procedure to identify the parcel attached to the note.
How do I get the parcel ID on inserting a new row.
Or, could I handle the updating with code, and if so, how do I do that?
Hello csnyder_ptb,
You can use “RowAdding” event which is fired before row is added to the collection and access parent grid like shown in this article - http://help.infragistics.com/Help/NetAdvantage/ASPNET/2011.2/CLR4.0/html/WebHierarchicalDataGrid_Hierarchical_View.html
Try this approach and let me know if it works in your scenario.
Let me know if you need further assistance with this question.
Worked it out, this piece of code does the trick.
protected void ParcelWebHierarchicalDataGrid_RowIslandDataBinding1(object sender, RowIslandEventArgs e){RowAddingColumnSetting setting = new RowAddingColumnSetting(); setting.ColumnKey = "ParcelID"; setting.DefaultValue = this.ParcelIDHiddenField.Value;
e.RowIsland.Band.Behaviors.EditingCore.Behaviors.RowAdding.ColumnSettings.Add(setting); e.RowIsland.DataBind();}
Thank you for posting your solution on the forum.
I hope that it will be helpful for other users too.