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
25
Row Selection not working in herirarchical grid
posted

Hi,

 

I am using selection behavior but unable to select a row. Please take a look at the code below and advice accordingly.

Thanks,

=============================================================================

<ig:WebHierarchicalDataGrid ID="whdg1" runat="server"
                    AutoGenerateBands="False"
                    AutoGenerateColumns="False"
                    InitialDataBindDepth="-1"            
                    DataKeyFields="OrderId"
                    Width="100%"
                    ItemCssClass="ParentItem"
                    AltItemCssClass="ParentAltItem"
                    HeaderCaptionCssClass="ParentHeaderCaption"                    
                    ExpandButton-ImageUrl="~/Images/WH/ExpandLineItems.png"
                    ExpandButton-HoverImageUrl="~/Images/WH/ExpandLineItems.png"
                    ExpandButton-PressedImageUrl="~/Images/WH/ExpandLineItems.png"
                    CollapseButton-ImageUrl="~/Images/WH/CollapseLineItems.png"
                    CollapseButton-HoverImageUrl="~/Images/WH/CollapseLineItems.png"
                    CollapseButton-PressedImageUrl="~/Images/WH/CollapseLineItems.png">
               
                <Columns>                   
                    <ig:BoundDataField DataFieldName="PONumber" Key="PONumber" Width="80px">
                        <Header Text="PO#"></Header>
                    </ig:BoundDataField>
                    <ig:TemplateDataField Key="MemberNumber1" Width="100px">
                        <Header Text="Member#"></Header>
                        <ItemTemplate>
                           <div style="text-align:center;"> 001012345001 </div>
                        </ItemTemplate>
                    </ig:TemplateDataField>
                    <ig:BoundDataField DataFieldName="MemberName" Key="MemberName" Width="128px">
                        <Header Text="Member Name"></Header>
                    </ig:BoundDataField>
                    <ig:BoundDataField DataFieldName="Vendor" Key="Vendor" Width="124px">
                        <Header Text="Vendor"></Header>
                    </ig:BoundDataField>
                    <ig:BoundDataField DataFieldName="ESD" Key="ESD" Width="55px">
                        <Header Text="ESD"></Header>
                    </ig:BoundDataField>
                    <ig:TemplateDataField Key="OrderStatus" Width="40px">
                        <Header Text="Status"></Header>
                        <ItemTemplate>
                            <div style="text-align:left">
                                <asp:Image ID="imgStatus" runat="server" ImageUrl="~/Images/WH/StatusPartial.png" />
                            </div>
                        </ItemTemplate>                       
                    </ig:TemplateDataField>
                    <ig:TemplateDataField Key="Carriers" Width="100px">
                     </ig:TemplateDataField>
                     <ig:TemplateDataField Key="SendComm" Width="40px">
                        <Header Text="Send Comm."></Header>
                        <ItemTemplate>
                                <asp:CheckBox ID="chkBoxReceive" runat="server" onclick="changeChildCB(this.id);" />
                        </ItemTemplate>
                    </ig:TemplateDataField>
                </Columns>
                <Behaviors>
                    <ig:Selection CellClickAction="Row" CellSelectType="None" RowSelectType="Single" />
                </Behaviors>
                               
                <Bands>
                    <ig:Band AutoGenerateColumns="False" DataMember="LineItem" Key="LineItem" DataKeyFields="LineItemId"
                        DefaultColumnWidth="0px"
                        ItemCssClass="ChildItem" AltItemCssClass="ChildAltItem" HeaderCaptionCssClass="ChildHeaderCaption">
                        <Columns>
                            <ig:BoundDataField DataFieldName="ItemCounter" Key="ItemCounter" Width="38px">
                                <Header Text="Item" />
                            </ig:BoundDataField>
                            <ig:BoundDataField DataFieldName="ModelNumber" Key="ModelNumber" Width="80px">
                                <Header Text="Model#" />
                            </ig:BoundDataField>
                            <ig:BoundDataField DataFieldName="Description" Key="Description" Width="80px">
                                <Header Text="Description" />
                            </ig:BoundDataField>
                            <ig:BoundDataField DataFieldName="QuantityOrdered" Key="QuantityOrdered" Width="50px">
                                <Header Text="Qty Ordered" />
                            </ig:BoundDataField>
                            <ig:BoundDataField DataFieldName="QuantityReceived" Key="QuantityReceived" Width="50px">
                                <Header Text="Qty Received" />
                            </ig:BoundDataField>
                            <ig:BoundDataField DataFieldName="QuantityPickedUp" Key="QuantityPickedUp" Width="50px">
                                <Header Text="Picked Up Qty" />
                            </ig:BoundDataField>
                            <ig:TemplateDataField Key="Receipts" Width="47px">
                                <Header Text="Receipts" />
                                <ItemTemplate>
                                    <asp:LinkButton ID="lnkBtnReceiveReceipt" Font-Bold="true" runat="server" Text="R." />&nbsp;&nbsp;
                                    <asp:LinkButton ID="lnkBtnPickup" Font-Bold="true" runat="server" Text="P." />
                                </ItemTemplate>
                            </ig:TemplateDataField>
                            <ig:TemplateDataField Key="History" Width="44px">
                                <Header Text="History" />
                                <ItemTemplate>
                                    <asp:LinkButton ID="lnkBtnHistory" Font-Bold="true" runat="server" Text="View" />
                                </ItemTemplate>
                            </ig:TemplateDataField>
                            <ig:TemplateDataField Key="Status" Width="40px">
                                <ItemTemplate>
                                    <div style="text-align:left">
                                        <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/WH/StatusPartial.png" />
                                    </div>
                                </ItemTemplate>
                            </ig:TemplateDataField>
                            <ig:TemplateDataField Key="Carriers" Width="100px">
                                <ItemTemplate>
                                    <%--
                                    <asp:DropDownList ID="DropDownList1" runat="server" Width="100%">
                                        <asp:ListItem Text="" Value="2" />
                                        <asp:ListItem Text="American Exp" Value="1" />
                                        <asp:ListItem Text="Airborne Express" Value="3" />
                                    </asp:DropDownList>
                                    --%>
                                </ItemTemplate>
                            </ig:TemplateDataField>
                            <ig:TemplateDataField Key="SendComm" Width="42px">
                                <Header Text="Send Comm."></Header>
                                <ItemTemplate>
                                        <asp:CheckBox ID="chkBoxReceive" runat="server" onclick="changeParentCB(this.id);" />
                                </ItemTemplate>
                            </ig:TemplateDataField>
                        </Columns>
                        <ExpandButton AltText="Expand Row" HoverImageUrl="~/Images/WH/ExpandLineItems.png"
                            ImageUrl="~/Images/WH/ExpandLineItems.png" PressedImageUrl="~/Images/WH/ExpandLineItems.png" />
                        <CollapseButton AltText="Collapse Row" HoverImageUrl="~/Images/WH/CollapseLineItems.png"
                            ImageUrl="~/Images/WH/CollapseLineItems.png" PressedImageUrl="~/Images/WH/CollapseLineItems.png" />
                        <GroupingSettings>
                            <RemoveButton AltText="Ungroup Column" />
                        </GroupingSettings>
                      </ig:Band>
                    </Bands>
                <CollapseButton AltText="Collapse Row" HoverImageUrl="~/Images/WH/CollapseLineItems.png" ImageUrl="~/Images/WH/CollapseLineItems.png" PressedImageUrl="~/Images/WH/CollapseLineItems.png" />
                <ExpandButton AltText="Expand Row" HoverImageUrl="~/Images/WH/ExpandLineItems.png" ImageUrl="~/Images/WH/ExpandLineItems.png" PressedImageUrl="~/Images/WH/ExpandLineItems.png" />
                <GroupingSettings>
                    <RemoveButton AltText="Ungroup Column" />
                </GroupingSettings>
            </ig:WebHierarchicalDataGrid>

=============================================================================

Parents
  • 242
    posted

    try using

    Normal 0 false false false EN-US X-NONE AR-SA MicrosoftInternetExplorer4                     <ig:Selection CellClickAction="Row" CellSelectType="Multiple" RowSelectType="Single" />

    instead of

    Normal 0 false false false EN-US X-NONE AR-SA MicrosoftInternetExplorer4                     <ig:Selection CellClickAction="Row" CellSelectType="None" RowSelectType="Single" />

Reply Children
No Data