Hello,
I would like to know if it was possible to have a value for a parent cell when the focus is given at a child cell? In order to display this value outside of the whdg.
for example:
parent 1 parent2 parent3 parent4 parent5
val1 val2 val3 val4 val5
val11 val12 val13 val14 val15
val21 val22 val23 val24 val25
parent 11 parent12 parent13 parent14 parent15
valA valB valC valD valE
valAA valAB valAC valAD valAE
valBA valBB valBC valBD valBE
If my cell valAC or valBE, or valA... has the focus, I would like display parent11
If the cell e.g. val22, or val12, or val4 ... has the focus, I would like to display parent1
Thanks for your answer and have a nice day.
Best Regards
Damien
Hello Damien,
I would suggest use Activation behavior of the grid. You will be able to to subscribe handler for ActiveCellChanged like this:
<Behaviors>
<ig:Activation>
<ActivationClientEvents ActiveCellChanged="Handler" />
</ig:Activation>
</Behaviors>
More information about Activation behavior you can see here : http://help.infragistics.com/NetAdvantage/ASPNET/2010.1/CLR3.5/?page=WebDataGrid_Activation.html
Hope this helps.
Hello Radoslav,
Sorry for my late answer, I was on holidays with no possibility to test your solution.
Thanks for your help, and for your clues, but I could not not see how reach my parent cell when the children has the focus.
I created a JS function called "Handler", like this:
function
Handler()
{
var grid = $find("GridSampleSize");
alert(activeCell);
}
and I have the error "null is null or not an object, but GridSampleSize exists.
And once I will have the active cell, how could I have the parent?
Thanks for your help
Sincerely,
Hi David,
Thanks for your post, it was really helpful and I solved my problem.
Thanks again and regards
Hey Damien,
What you want to do is change your handler to
Handler(sender, args)
Than you can get the active cell as args.getActiveCell(). When you were doing
var grid = $find("GridSampleSize");,
that was finding the hierarchical grid. to get to the activation behavior, you'd have to do grid.get_gridView().get_behaviors()... To get the parent row of the grid that has the active cell, you can actually do sender.get_parentRow().
Hope this helps you out.
regards,David Young