Hello mcseidel ,
I apologize about the delayed answer.
Adding additional elements after the container grid is not supported out of the box. Making changes to the child grid however will trigger updating events like it does for the parent grid.
So in that event you can update the data source of the grid. As for triggering a call to the server. If you have activation behavior enabled the updating will trigger on every cell value changing after you change the active cell. Otherwise if you’ve enabled batch updating any page postback will trigger the updating event.
For editing of only some of the cells you’ll need to enable editing behavior for the child band (container grid you created) and set the EditingColumnSettings correspondingly with ReadOnly to true for the columns that should not be editable and ReadOnly to false for the ones that should be editable.
Please refer to the attached sample and let me know if you have any further questions.
Best Regards,
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://ko.infragistics.com/support
Thanks, that was helpful. I'm moving in the same direction of setting individual behaviors on the instance of the child grid and might ask couple of questions withing this post framework later.
What I am trying to say is that "ItemChild" seems will block enter value into every row of the column "Item" on the child grid..
1. How to access value of the cell
2. Is it a way to attach event to the child only to avoid extra traffic, because right not it goes for every celledit attampt.
You can register the client side event from the CellEditingBehavior for the child grid like this:
childGrid.Behaviors.EditingCore.Behaviors.CellEditing.CellEditingClientEvents.EnteringEditMode = "WHDGChildGrid_CellEditing_EnteringEditMode";
When you register it like this for the child grid the event will trigger only when you enter edit mode in the child grid.
Regarding the value of the current cell you can get it with:
eventArgs.getCell().get_text()
This will return the content of the current cell.
For example if you modify the previous code like this:
function WHDGChildGrid_CellEditing_EnteringEditMode(sender, eventArgs) {
if (eventArgs.getCell().get_text() == "Item 1") {
eventArgs.set_cancel(true);
}
Then only the cell with text “Item 1” will be read-only. Please refer to the modified sample and let me know if you have any questions.
I am adding this in the rowIslandsPouplating mehod but I get a script error when the child grid expand. Runtime Exception: TypeError: $IG[objName] is not a function
My code:
var child = new ContainerGrid();
e.Row.RowIslands.Add(child);
var selection = new RowSelectors
{
Enabled = true,
RowNumbering = false,
RowSelectorCssClass = "selector",
HeaderRowSelectorCssClass = "HeaderRowSelector"
};
child.Behaviors.Add(selection);
selection.RowSelectorClientEvents.RowSelectorClicked = "whdg1_RowSelector_RowSelectorClicked";
child.DataSource = dt;
child.DataBind();
I was able to resolve my issues by setting ajaxEnabled to false.
Thank you