Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
745
Get Current Index of Parent Row
posted

Hi,

 

I have a simple webhierarchicaldatagrid, and in the second band I have a template column with a button like the following:

 

<ig:WebHierarchicalDataGrid ID="wdgLOG" runat="server" AutoGenerateColumns="False"

Height="300" AutoGenerateBands="False" InitialDataBindDepth="-1" Width="100%"

DataKeyFields="Lote" EnableDataViewState="true" EnableAjax="false" DataMember="Files"

Key="Files">

<ExpandCollapseAnimation SlideOpenDirection="Auto" SlideOpenDuration="300" SlideCloseDirection="Auto"

SlideCloseDuration="300" />

<Columns>

……

</Columns>

<Bands>

<ig:Band DataKeyFields="ProcSourceFileID,ProcFileID" AutoGenerateColumns="false"

DataMember="FilesDet" Key="FilesDet" ShowHeader="true">

<Columns>

……

<ig:TemplateDataField Key="Audit" Width="16px" Header-Text="" Header-Tooltip="Ver Auditoria">

<ItemTemplate>

<asp:LinkButton ID="lbtnAudit" runat="server" Height="16px" CssClass="CmdAbrirAuditoria"

ToolTip="Auditoria" CommandName="CmdAudit" CommandArgument='<%# DataBinder.Eval(CType(Container, Infragistics.Web.UI.TemplateContainer).Item, "Row.Index") %>'></asp:LinkButton>      

</ItemTemplate>

</ig:TemplateDataField>

</Columns>

</ig:Band>

</Bands>

</ig:WebHierarchicalDataGrid>

 

When I click lbtnAudit Button I want to know what row I'm currently in, so I use ItemCommand Event:

 

Private Sub wdgLOG_ItemCommand(sender As Object, e As Infragistics.Web.UI.GridControls.HandleCommandEventArgs) Handles wdgLOG.ItemCommand

    If e.CommandName = "CmdAudit" Then
.....

I know that the property CommandArgument gives the current row index and it works perfectly. But I need to know the index of the parent row too, because CommandArgument only gives the current child index...
How can I do this?

Thank you