Thanks
Hello mcseidel,
On the client side you can manually trigger the ajax call to the serever by invoking the commit method. For example in the CellSelectionChanged client side event you can do the following:
function WebHierarchicalDataGrid1_Selection_CellSelectionChanged(sender, eventArgs)
{
///<param name="sender" type="Infragistics.Web.UI.WebHierarchicalDataGrid"></param>
///<param name="eventArgs" type="Infragistics.Web.UI.CellSelectionChangedEventArgs"></param>
sender.get_behaviors().get_editingCore().commit()
}
Regarding the events for the child grid. You can register them in the following way:
childGrid.InitializeRow += new InitializeRowEventHandler(childGrid_InitializeRow);
They should trigger events associated only with the current container grid.
I’ve noticed however that this doesn’t seem to behave as expected for the RowUpdating event.
I’ll log this issue to be reviewed by our development team. I’ll contact you with the development issue number so that you may track it’s progress.
Best Regards,
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://es.infragistics.com/support
I need to enable postback on the loaded on demand child grid. There is RowUpdating event, how I can added to child grid without triggering same event on parent grid. Further, I actually need it to get triggered rather on cell updating so I can process it on the server side. Can I instead of RowUpdating use cellSelectionChanged and process in on the server and raise this event ( and process it) only from the child grid ? Anyway what would be most efficient approach to process change of the value in the child grid cell on the server.Thanks.
Hello mcseidel ,
I recall coming across this issue before. I appologize for not noticing it.
The child grid needs to be added to the RowIsland collection before any properties are set on it. Setting the properties triggers creation of other objects and since the child grid is not part of the rowIslands collection yet it does not have a reference to the page and cannot create these object properly.
So make sure that you first add the childgrid to the rowislands collection and then make any additional changes to it.
Let me know if you have any further questions regarding this.
Hi Maya, you were very helpful and all the sample were to the point, I'll check that latest a bit later, but I want get back for a brief moment to something that took me about the full day to find out :
As I mention somewhere earlier that when I'm adding CellEdit behavior to the child grid the same way you are in you projects somehow it does not work. Sort funny enough I can break your projects now too, all it needs to switch this two lines :
e.Row.RowIslands.Add(childGrid); //We disable the autogenerated columns and create the columns so that we can have access to them in the columns collection childGrid.AutoGenerateColumns = false;
i.e. if childGrid.AutoGenerateColumns = false; executed on existing object first, before adding it to the rowIsland "Celledit" behavior not going to work on the child grid.
This note is to share the solution to the strange problem and also you might know why it happening. It does not look intuitive...
Thanks.