This is a migrated thread and some comments may be shown as answers.

Expand/Collapse button is not aligning properly

4 Answers 156 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Binod
Top achievements
Rank 1
Binod asked on 29 May 2010, 08:17 AM
<telerik:RadGrid ID="rdGOSTView" runat="server" AllowPaging="true" PageSize="3" AllowSorting="True" 
                    OnDetailTableDataBind="rdGOSTView_DetailTableDataBind" OnNeedDataSource="rdGOSTView_NeedDataSource" 
                    OnPreRender="rdGOSTView_PreRender" OnDeleteCommand="rdGOSTView_DeleteCommand" 
                    OnInsertCommand="rdGOSTView_InsertCommand" OnItemCreated="rdGOSTView_ItemCreated" 
                    OnItemDataBound="rdGOSTView_ItemDataBound" OnUpdateCommand="rdGOSTView_UpdateCommand" 
                    OnItemCommand="rdGOSTView_ItemCommand">  
                    <GroupingSettings CaseSensitive="false" /> 
                    <FilterItemStyle HorizontalAlign="Left" /> 
                    <HeaderStyle HorizontalAlign="Center" ForeColor="Black" Font-Bold="true" Font-Size="10px" 
                        Font-Names="Verdana" /> 
                    <AlternatingItemStyle Font-Size="10px" Font-Names="verdana" /> 
                    <ItemStyle HorizontalAlign="Left" Font-Size="10px" Font-Names="verdana" /> 
                    <PagerStyle Mode="NumericPages"></PagerStyle> 
                    <GroupHeaderItemStyle HorizontalAlign="Left" Width="15px" VerticalAlign="bottom" BorderWidth="15px" /> 
                    <GroupingSettings ExpandTooltip="Expand" CollapseTooltip="Collapse" /> 
                    <MasterTableView DataKeyNames="GoalID" Width="100%" CommandItemDisplay="Top" Name="Goals" 
                        EditMode="EditForms" AutoGenerateColumns="false" TableLayout="Fixed">  
                        <%--Goal Grid Starts--%> 
                        <DetailTables> 
                            <%--Objective Grid Starts--%> 
                            <telerik:GridTableView DataKeyNames="GoalID,ObjectiveID" Width="100%" runat="server" 
                                AutoGenerateColumns="false" CommandItemDisplay="Top" Name="Objectives" EditMode="EditForms">  
                                <ParentTableRelation> 
                                    <telerik:GridRelationFields DetailKeyField="GoalID" MasterKeyField="GoalID" /> 
                                </ParentTableRelation> 
                                <DetailTables> 
                                    <%--Strategy Grid Starts--%> 
                                    <telerik:GridTableView DataKeyNames="GoalID,ObjectiveID,StrategyID" Width="100%" 
                                        AutoGenerateColumns="false" runat="server" CommandItemDisplay="Top" Name="Strategy" 
                                        EditMode="EditForms">  
                                        <ParentTableRelation> 
                                            <telerik:GridRelationFields DetailKeyField="ObjectiveID" MasterKeyField="ObjectiveID" /> 
                                        </ParentTableRelation> 
                                        <DetailTables> 
                                            <%--Tactics Grid starts--%> 
                                            <telerik:GridTableView DataKeyNames="GoalID,ObjectiveID,StrategyID,TacticsID" Width="100%" 
                                                AutoGenerateColumns="false" runat="server" CommandItemDisplay="Top" Name="Tactics" 
                                                EditMode="EditForms">  
                                                <ParentTableRelation> 
                                                    <telerik:GridRelationFields DetailKeyField="StrategyID" MasterKeyField="StrategyID" /> 
                                                </ParentTableRelation> 
                                                <Columns> 
                                                    <%--Tactics Grid Column--%> 
                                                    <telerik:GridBoundColumn DataField="GoalID" UniqueName="GoalID" HeaderText="GoalID" 
                                                        Visible="false">  
                                                    </telerik:GridBoundColumn> 
                                                    <telerik:GridBoundColumn DataField="ObjectiveID" UniqueName="ObjectiveID" HeaderText="ObjectiveID" 
                                                        Visible="false">  
                                                    </telerik:GridBoundColumn> 
                                                    <telerik:GridBoundColumn DataField="StrategyID" UniqueName="StrategyID" HeaderText="StrategyID" 
                                                        Visible="false">  
                                                    </telerik:GridBoundColumn> 
                                                    <telerik:GridBoundColumn DataField="TacticsID" UniqueName="TacticsID" HeaderText="TacticsID" 
                                                        Visible="false">  
                                                    </telerik:GridBoundColumn> 
                                                    <telerik:GridBoundColumn DataField="PriorityOrder" UniqueName="PriorityOrder" HeaderText="#" 
                                                        Visible="true" ItemStyle-Width="20px" CurrentFilterFunction="EqualTo" AutoPostBackOnFilter="true" 
                                                        FilterControlWidth="20px" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" 
                                                        ItemStyle-VerticalAlign="Middle">  
                                                    </telerik:GridBoundColumn> 
                                                    <telerik:GridTemplateColumn HeaderText="Tactics" HeaderTooltip="What tangibles you'll use to accomplish" Visible="true" UniqueName="Tactics" 
                                                        ItemStyle-Wrap="true" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Center" 
                                                        HeaderStyle-Font-Size="12px" ItemStyle-VerticalAlign="Middle">  
                                                        <ItemTemplate> 
                                                            <asp:Label ID="lblTac" runat="server" Text='<%#Bind("Tactics")%>'></asp:Label> 
                                                        </ItemTemplate> 
                                                    </telerik:GridTemplateColumn> 
                                                    <telerik:GridBoundColumn DataField="PointPersonName" UniqueName="PointPerson" HeaderText="Point Person" 
                                                        Visible="true" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Center" 
                                                        CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" ItemStyle-Wrap="true" 
                                                        ItemStyle-VerticalAlign="Middle">  
                                                    </telerik:GridBoundColumn> 
                                                    <telerik:GridBoundColumn DataField="TimeFrame" UniqueName="TimeFrame" HeaderText="Time Frame" 
                                                        ItemStyle-VerticalAlign="Middle" Visible="true" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" 
                                                        HeaderStyle-HorizontalAlign="Center">  
                                                    </telerik:GridBoundColumn> 
                                                    <telerik:GridBoundColumn DataField="OtherPointPerson" UniqueName="OtherPointPerson" 
                                                        HeaderText="OtherPointPerson" Visible="false" ItemStyle-VerticalAlign="Middle">  
                                                    </telerik:GridBoundColumn> 
                                                    <telerik:GridTemplateColumn UniqueName="PriorityStatus" HeaderText="Status" DataField="StatusID" 
                                                        ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="30px" 
                                                        Visible="true" AllowFiltering="false" ItemStyle-VerticalAlign="Middle">  
                                                        <ItemTemplate> 
                                                            <asp:ImageButton ID="btnStatus" runat="server" ImageUrl='<%#Bind("logopath")%>' ToolTip='<%#Bind("Status")%>' /> 
                                                        </ItemTemplate> 
                                                    </telerik:GridTemplateColumn> 
                                                    <telerik:GridTemplateColumn HeaderText="Edit" UniqueName="EditCommandColumn" HeaderStyle-HorizontalAlign="Center" 
                                                        ItemStyle-HorizontalAlign="Center" AllowFiltering="false" ItemStyle-VerticalAlign="Middle">  
                                                        <ItemTemplate> 
                                                            &nbsp;&nbsp;<asp:ImageButton ID="btnEdit" ToolTip="Edit" runat="server" ImageUrl="~/images/Edit.gif" 
                                                                CommandName="Edit" CssClass="MyImageButton" Enabled="true" ImageAlign="Middle" />&nbsp;  
                                                        </ItemTemplate> 
                                                        <ItemStyle Width="30px" HorizontalAlign="Center" /> 
                                                        <HeaderStyle Width="30px" HorizontalAlign="Center" /> 
                                                    </telerik:GridTemplateColumn> 
                                                    <telerik:GridTemplateColumn HeaderText="Delete" UniqueName="DeleteCommandColumn" 
                                                        ItemStyle-VerticalAlign="Middle" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" 
                                                        AllowFiltering="false">  
                                                        <ItemTemplate> 
                                                            &nbsp;&nbsp;<asp:ImageButton ID="btnDelete" ToolTip="Delete" runat="server" ImageUrl="~/images/Delete.gif" 
                                                                CommandName="Delete" CssClass="MyImageButton" Enabled="true" ImageAlign="Middle" />&nbsp;  
                                                        </ItemTemplate> 
                                                        <ItemStyle Width="30px" HorizontalAlign="Center" /> 
                                                        <HeaderStyle Width="30px" HorizontalAlign="Center" /> 
                                                    </telerik:GridTemplateColumn> 
                                                </Columns> 
                                                <CommandItemTemplate> 
                                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">  
                                                        <tr> 
                                                            <td width="40%" align="left" style="padding-left: 10px">  
                                                                <asp:Label ID="lblTactics" runat="server" Text="Tactics" 
                                                                    Font-Size="13px" Font-Bold="true" ToolTip="What tangibles you'll use to accomplish"></asp:Label> 
                                                            </td> 
                                                            <td align="right" style="padding-right: 15px">  
                                                            </td> 
                                                            <td align="right" width="60%">  
                                                                <asp:Image ID="Imge" ImageUrl="~/Images/AddRecord.gif" runat="server" /><asp:LinkButton  
                                                                    ID="btn_Add" Font-Size="10px" Text="Add New" Font-Underline="true" runat="server" 
                                                                    CommandName="InitInsert" Enabled="true" ToolTip="Add New Record"></asp:LinkButton> 
                                                            </td> 
                                                        </tr> 
                                                    </table> 
                                                </CommandItemTemplate> 
                                                <EditFormSettings PopUpSettings-Modal="true" PopUpSettings-Width="810px" EditFormType="Template">  
                                                    <FormTemplate> 
                                                        <table width="100%" cellpadding="0" cellspacing="0" border="0" style="background-color: #ffffff;  
                                                            padding-left: 10px" height="100px">  
                                                            <tr> 
                                                                <td class="select_parameter" align="left" style="width: 100px">  
                                                                    Priority Order  
                                                                </td> 
                                                                <td align="left" style="width: 180px">  
                                                                    <telerik:RadComboBox ID="rdcmbTPriorityOrder" runat="server" Width="170px">  
                                                                    </telerik:RadComboBox> 
                                                                </td> 
                                                                <td class="select_parameter" align="left" style="width: 90px">  
                                                                    Tactics  
                                                                </td> 
                                                                <td align="left" style="width: 60%" colspan="7">  
                                                                    <telerik:RadTextBox ID="txtTactics" MaxLength="250" Text='<% #Bind("Tactics") %>' 
                                                                        Width="100%" runat="server" Font-Names="verdana" Font-Size="10px" Wrap="true" 
                                                                        Height="15px">  
                                                                    </telerik:RadTextBox> 
                                                                </td> 
                                                            </tr> 
                                                            <tr> 
                                                                <td class="select_parameter" align="left">  
                                                                    Point Person  
                                                                </td> 
                                                                <td align="left">  
                                                                    <telerik:RadComboBox ID="rdcmbPointPerson" runat="server" EmptyMessage='Select PointPerson' 
                                                                        Width="170px" Height="220px">  
                                                                        <Items> 
                                                                            <telerik:RadComboBoxItem runat="server" /> 
                                                                        </Items> 
                                                                        <ItemTemplate> 
                                                                            <div> 
                                                                                <telerik:RadTreeView ID="rtPointPerson" runat="server" CheckBoxes="true" OnClientNodeChecked="onPPNodeChecked">  
                                                                                </telerik:RadTreeView> 
                                                                            </div> 
                                                                        </ItemTemplate> 
                                                                    </telerik:RadComboBox> 
                                                                </td> 
                                                                <td class="select_parameter" align="left">  
                                                                    Time Frame  
                                                                </td> 
                                                                <td colspan="7">  
                                                                    <table> 
                                                                        <tr> 
                                                                            <td> 
                                                                                From  
                                                                            </td> 
                                                                            <td> 
                                                                                <telerik:RadDatePicker Width="100px" DateInput-ReadOnly="true" ID="fromDatePicker" 
                                                                                    runat="server">  
                                                                                    <DatePopupButton Visible="True"></DatePopupButton> 
                                                                                    <Calendar ShowRowHeaders="false"></Calendar> 
                                                                                    <DatePopupButton ToolTip="" /> 
                                                                                </telerik:RadDatePicker> 
                                                                            </td> 
                                                                            <td> 
                                                                                To  
                                                                            </td> 
                                                                            <td> 
                                                                                <telerik:RadDatePicker Width="100px" DateInput-ReadOnly="true" Visible="true" ID="toDatePicker" 
                                                                                    runat="server">  
                                                                                    <DatePopupButton Visible="True"></DatePopupButton> 
                                                                                    <Calendar ShowRowHeaders="false"></Calendar> 
                                                                                    <DatePopupButton ToolTip="" /> 
                                                                                </telerik:RadDatePicker> 
                                                                            </td> 
                                                                        </tr> 
                                                                    </table> 
                                                                </td> 
                                                            </tr> 
                                                            <tr> 
                                                                <td class="select_parameter" align="left">  
                                                                    Additional Point Person  
                                                                </td> 
                                                                <td align="left">  
                                                                    <telerik:RadTextBox ID="rdtxtOthersPointPerson" MaxLength="100" runat="server" Width="170px" 
                                                                        Text='<% #Bind("OtherPointPerson") %>'>  
                                                                    </telerik:RadTextBox> 
                                                                </td> 
                                                                <td class="select_parameter" align="left">  
                                                                    Status  
                                                                </td> 
                                                                <td align="left" colspan="1">  
                                                                    <telerik:RadComboBox ID="rdcmbStatus" runat="server" Width="190px" Height="150px">  
                                                                    </telerik:RadComboBox> 
                                                                </td> 
                                                                <td align="right" colspan="6" style="padding-right: 20px">  
                                                                    <asp:ImageButton ID="imgTUpdate" ToolTip='<%# (Container as GridItem).OwnerTableView.IsItemInserted ? "Insert" : "Update" %>' 
                                                                        runat="server" CommandName='<%# (Container as GridItem).OwnerTableView.IsItemInserted ? "PerformInsert" : "Update" %>' 
                                                                        ImageUrl="~/images/Update.gif" OnClientClick="if(!validationTactics())return false;">  
                                                                    </asp:ImageButton> 
                                                                    &nbsp;  
                                                                    <asp:ImageButton ID="imgTCancel" runat="server" CausesValidation="false" CommandName="Cancel" 
                                                                        ToolTip="Cancel" ImageUrl="~/images/Cancel.gif" OnClientClick="if(!CancelValidation())return false;" /> 
                                                                </td> 
                                                            </tr> 
                                                        </table> 
                                                    </FormTemplate> 
                                                </EditFormSettings> 
                                            </telerik:GridTableView> 
                                            <%--Tactics Grid Ends--%> 
                                        </DetailTables> 
                                        <Columns> 
                                            <%--Strategy Grid Column--%> 
                                            <telerik:GridBoundColumn DataField="GoalID" UniqueName="GoalID" HeaderText="GoalID" 
                                                Visible="false">  
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="ObjectiveID" UniqueName="ObjectiveID" HeaderText="ObjectiveID" 
                                                Visible="false">  
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="StrategyID" UniqueName="StrategyID" HeaderText="StrategyID" 
                                                Visible="false">  
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="PriorityOrder" UniqueName="PriorityOrder" HeaderText="#" 
                                                Visible="true" ItemStyle-Width="20px" HeaderStyle-Width="20px" HeaderStyle-HorizontalAlign="Center" 
                                                ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle">  
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridTemplateColumn HeaderText="Strategy" HeaderTooltip="How I will accomplish" Visible="true" UniqueName="Strategy" 
                                                ItemStyle-Wrap="true" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Center" 
                                                HeaderStyle-Font-Size="12px" ItemStyle-VerticalAlign="Middle">  
                                                <ItemTemplate> 
                                                    <asp:Label ID="lblstr" runat="server" Text='<%#Bind("Strategy")%>'></asp:Label> 
                                                    <asp:ImageButton ID="imgbtnChange" ImageUrl='<%#Bind("RDLogoPath")%>' CommandName="RDChange" 
                                                        ToolTip='<%#Bind("NewStrategy")%>' Enabled="true" CssClass="MyImageButton" runat="server" 
                                                        OnClientClick="if(!CancelChanges())return false;" /> 
                                                </ItemTemplate> 
                                                <ItemStyle Width="80%" HorizontalAlign="Left" /> 
                                                <HeaderStyle Width="80%" HorizontalAlign="Center" /> 
                                            </telerik:GridTemplateColumn> 
                                            <telerik:GridTemplateColumn HeaderText="Edit" UniqueName="EditCommandColumn" HeaderStyle-HorizontalAlign="Center" 
                                                ItemStyle-HorizontalAlign="Center" AllowFiltering="false" ItemStyle-VerticalAlign="Middle">  
                                                <ItemTemplate> 
                                                    &nbsp;&nbsp;<asp:ImageButton ID="btnEdit" ToolTip="Edit" runat="server" ImageUrl="~/images/Edit.gif" 
                                                        CommandName="Edit" CssClass="MyImageButton" Enabled="true" ImageAlign="Middle" />&nbsp;  
                                                </ItemTemplate> 
                                                <ItemStyle Width="30px" HorizontalAlign="Center" /> 
                                                <HeaderStyle Width="30px" HorizontalAlign="Center" /> 
                                            </telerik:GridTemplateColumn> 
                                            <telerik:GridTemplateColumn HeaderText="Delete" UniqueName="DeleteCommandColumn" 
                                                ItemStyle-VerticalAlign="Middle" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" 
                                                AllowFiltering="false">  
                                                <ItemTemplate> 
                                                    &nbsp;&nbsp;<asp:ImageButton ID="btnDelete" ToolTip="Delete" runat="server" ImageUrl="~/images/Delete.gif" 
                                                        CommandName="Delete" CssClass="MyImageButton" Enabled="true" ImageAlign="Middle" />&nbsp;  
                                                </ItemTemplate> 
                                                <ItemStyle Width="30px" HorizontalAlign="Center" /> 
                                                <HeaderStyle Width="30px" HorizontalAlign="Center" /> 
                                            </telerik:GridTemplateColumn> 
                                            <telerik:GridBoundColumn DataField="IsDeleted" UniqueName="IsDeleted" HeaderText="IsDeleted" 
                                                Visible="false">  
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="IsUpdated" UniqueName="IsUpdated" HeaderText="IsUpdated" 
                                                Visible="false">  
                                            </telerik:GridBoundColumn> 
                                        </Columns> 
                                        <CommandItemTemplate> 
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">  
                                                <tr> 
                                                    <td width="40%" align="left" style="padding-left: 10px">  
                                                        <asp:Label ID="lblStrategy" runat="server" Text="Strategy" ToolTip="How I will accomplish" Font-Size="13px" Font-Bold="true"></asp:Label> 
                                                    </td> 
                                                    <td align="right" style="padding-right: 15px">  
                                                    </td> 
                                                    <td align="right" width="60%">  
                                                        <asp:Image ID="Imge" ImageUrl="~/Images/AddRecord.gif" runat="server" /><asp:LinkButton  
                                                            ID="btn_Add" Font-Size="10px" Text="Add New" Font-Underline="true" runat="server" 
                                                            CommandName="InitInsert" Enabled="true" ToolTip="Add New Record"></asp:LinkButton> 
                                                    </td> 
                                                </tr> 
                                            </table> 
                                        </CommandItemTemplate> 
                                        <EditFormSettings PopUpSettings-Modal="true" PopUpSettings-Width="840px" EditFormType="Template">  
                                            <FormTemplate> 
                                                <table width="100%" cellpadding="0" cellspacing="0" border="0" style="background-color: #ffffff;  
                                                    padding-left: 10px" height="30px">  
                                                    <tr> 
                                                        <td class="select_parameter" align="left" style="width: 100px">  
                                                            Priority Order  
                                                        </td> 
                                                        <td align="left" style="width: 60px">  
                                                            <telerik:RadComboBox ID="rdcmbSPriorityOrder" runat="server" Width="55px">  
                                                            </telerik:RadComboBox> 
                                                        </td> 
                                                        <td class="select_parameter" align="left" style="width: 60px">  
                                                            Strategy  
                                                        </td> 
                                                        <td align="left" style="width: 65%">  
                                                            <telerik:RadTextBox ID="txtStrategy" MaxLength="250" Text='<% #Bind("Strategy") %>' 
                                                                Width="100%" runat="server" Font-Names="verdana" Font-Size="10px" Wrap="true" 
                                                                Height="15px">  
                                                            </telerik:RadTextBox> 
                                                        </td> 
                                                        <td align="left" colspan="2" style="padding-left: 10px; width: 90px">  
                                                            <asp:ImageButton ID="ImageButton3" ToolTip='<%# (Container as GridItem).OwnerTableView.IsItemInserted ? "Insert" : "Update" %>' 
                                                                runat="server" CommandName='<%# (Container as GridItem).OwnerTableView.IsItemInserted ? "PerformInsert" : "Update" %>' 
                                                                ImageUrl="~/images/Update.gif" OnClientClick="if(!validationStrategy())return false;">  
                                                            </asp:ImageButton> 
                                                            &nbsp;  
                                                            <asp:ImageButton ID="ImageButton4" runat="server" CausesValidation="false" CommandName="Cancel" 
                                                                ToolTip="Cancel" ImageUrl="~/images/Cancel.gif" OnClientClick="if(!CancelValidation())return false;" /> 
                                                        </td> 
                                                    </tr> 
                                                </table> 
                                            </FormTemplate> 
                                        </EditFormSettings> 
                                    </telerik:GridTableView> 
                                    <%--Strategy Grid Ends--%> 
                                </DetailTables> 
                                <Columns> 
                                    <%--Objective Grid Column--%> 
                                    <telerik:GridBoundColumn DataField="GoalID" UniqueName="GoalID" HeaderText="GoalID" 
                                        Visible="false">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn DataField="ObjectiveID" UniqueName="ObjectiveID" HeaderText="ObjectiveID" 
                                        Visible="false">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn DataField="PriorityOrder" UniqueName="PriorityOrder" HeaderText="#" 
                                        Visible="true" ItemStyle-Width="20px" HeaderStyle-Width="20px" HeaderStyle-HorizontalAlign="Center" 
                                        ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="bottom">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridTemplateColumn HeaderText="Objective" HeaderTooltip="To achieve  x percent share..." Visible="true" UniqueName="Objective" 
                                        ItemStyle-Wrap="true" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Center" 
                                        HeaderStyle-Font-Size="12px">  
                                        <ItemTemplate> 
                                            <asp:Label ID="lblOb" runat="server" Text='<%#Bind("Objective")%>'></asp:Label> 
                                            <asp:ImageButton ID="imgbtnChange" ImageUrl='<%#Bind("RDLogoPath")%>' CommandName="RDChange" 
                                                ToolTip='<%#Bind("NewObjective")%>' Enabled="true" CssClass="MyImageButton" runat="server" 
                                                OnClientClick="if(!CancelChanges())return false;" /> 
                                        </ItemTemplate> 
                                        <ItemStyle Width="80%" HorizontalAlign="Left" /> 
                                        <HeaderStyle Width="80%" HorizontalAlign="Center" /> 
                                    </telerik:GridTemplateColumn> 
                                    <telerik:GridTemplateColumn HeaderText="Edit" UniqueName="EditCommandColumn" HeaderStyle-HorizontalAlign="Center" 
                                        ItemStyle-HorizontalAlign="Center" AllowFiltering="false" ItemStyle-VerticalAlign="Middle">  
                                        <ItemTemplate> 
                                            &nbsp;&nbsp;<asp:ImageButton ID="btnEdit" ToolTip="Edit" runat="server" ImageUrl="~/images/Edit.gif" 
                                                CommandName="Edit" CssClass="MyImageButton" Enabled="true" ImageAlign="Middle" />&nbsp;  
                                        </ItemTemplate> 
                                        <ItemStyle Width="30px" HorizontalAlign="Center" /> 
                                        <HeaderStyle Width="30px" HorizontalAlign="Center" /> 
                                    </telerik:GridTemplateColumn> 
                                    <telerik:GridTemplateColumn HeaderText="Delete" UniqueName="DeleteCommandColumn" 
                                        ItemStyle-VerticalAlign="Middle" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" 
                                        AllowFiltering="false">  
                                        <ItemTemplate> 
                                            &nbsp;&nbsp;<asp:ImageButton ID="btnDelete" ToolTip="Delete" runat="server" ImageUrl="~/images/Delete.gif" 
                                                CommandName="Delete" CssClass="MyImageButton" Enabled="true" ImageAlign="Middle" />&nbsp;  
                                        </ItemTemplate> 
                                        <ItemStyle Width="30px" HorizontalAlign="Center" /> 
                                        <HeaderStyle Width="30px" HorizontalAlign="Center" /> 
                                    </telerik:GridTemplateColumn> 
                                    <telerik:GridBoundColumn DataField="IsDeleted" UniqueName="IsDeleted" HeaderText="IsDeleted" 
                                        Visible="false">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn DataField="IsUpdated" UniqueName="IsUpdated" HeaderText="IsUpdated" 
                                        Visible="false">  
                                    </telerik:GridBoundColumn> 
                                </Columns> 
                                <CommandItemTemplate> 
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">  
                                        <tr> 
                                            <td width="40%" align="left" style="padding-left: 10px">  
                                                <asp:Label ID="lblObjective" runat="server" Text="Objective" ToolTip="To achieve  x percent share..." Font-Size="13px" Font-Bold="true"></asp:Label> 
                                            </td> 
                                            <td align="right" style="padding-right: 15px">  
                                            </td> 
                                            <td align="right" width="60%">  
                                                <asp:Image ID="Imge" ImageUrl="~/Images/AddRecord.gif" runat="server" /><asp:LinkButton  
                                                    ID="btn_Add" Font-Size="10px" Text="Add New" Font-Underline="true" runat="server" 
                                                    CommandName="InitInsert" Enabled="true" ToolTip="Add New Record"></asp:LinkButton> 
                                            </td> 
                                        </tr> 
                                    </table> 
                                </CommandItemTemplate> 
                                <EditFormSettings PopUpSettings-Modal="true" PopUpSettings-Width="100%" EditFormType="Template">  
                                    <FormTemplate> 
                                        <table width="100%" cellpadding="0" cellspacing="0" border="0" style="background-color: #ffffff;  
                                            padding-left: 10px; height: 30px"> 
                                            <tr> 
                                                <td class="select_parameter" align="left" style="width: 90px">  
                                                    Priority Order  
                                                </td> 
                                                <td align="left" style="width: 60px">  
                                                    <telerik:RadComboBox ID="rdcmbOPriorityOrder" runat="server" Width="55px" Height="15px">  
                                                    </telerik:RadComboBox> 
                                                </td> 
                                                <td class="select_parameter" align="left" style="width: 60px">  
                                                    Objective  
                                                </td> 
                                                <td align="left" style="width: 65%">  
                                                    <telerik:RadTextBox ID="txtObjective" MaxLength="250" Text='<% #Bind("Objective") %>' 
                                                        Width="100%" runat="server" Font-Names="verdana" Font-Size="10px" Wrap="true" 
                                                        Height="15px">  
                                                    </telerik:RadTextBox> 
                                                </td> 
                                                <td align="left" colspan="8" style="padding-left: 20px; width: 80px">  
                                                    <asp:ImageButton ID="ImageButton1" ToolTip='<%# (Container as GridItem).OwnerTableView.IsItemInserted ? "Insert" : "Update" %>' 
                                                        runat="server" CommandName='<%# (Container as GridItem).OwnerTableView.IsItemInserted ? "PerformInsert" : "Update" %>' 
                                                        ImageUrl="~/images/Update.gif" OnClientClick="if(!validationObjective())return false;">  
                                                    </asp:ImageButton> 
                                                    &nbsp;  
                                                    <asp:ImageButton ID="ImageButton2" runat="server" CausesValidation="false" CommandName="Cancel" 
                                                        ToolTip="Cancel" ImageUrl="~/images/Cancel.gif" OnClientClick="if(!CancelValidation())return false;" /> 
                                                </td> 
                                            </tr> 
                                        </table> 
                                    </FormTemplate> 
                                </EditFormSettings> 
                            </telerik:GridTableView> 
                            <%--Objective Grid Ends--%> 
                        </DetailTables> 
                        <Columns> 
                            <%--Goal Grid Column--%> 
                            <telerik:GridBoundColumn DataField="GoalID" UniqueName="GoalID" HeaderText="GoalID" 
                                Visible="false">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn DataField="PriorityOrder" UniqueName="PriorityOrder" HeaderText="#" 
                                Visible="true" ItemStyle-Width="20px" HeaderStyle-Width="20px" HeaderStyle-HorizontalAlign="Center" 
                                ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="bottom">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridTemplateColumn HeaderText="Goal" HeaderTooltip="The Bullseye - To become..." Visible="true" UniqueName="Goal" ItemStyle-Wrap="true" 
                                ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Font-Size="12px" 
                                HeaderStyle-Font-Bold="true">  
                                <ItemTemplate> 
                                    <asp:Label ID="lblG" runat="server" Text='<%#Bind("Goal")%>'></asp:Label> 
                                    <asp:ImageButton ID="imgbtnChange" ImageUrl='<%#Bind("RDLogoPath")%>' ToolTip='<%#Bind("NewGoal")%>' 
                                        CommandName="RDChange" Enabled="true" CssClass="MyImageButton" runat="server" 
                                        OnClientClick="if(!CancelChanges())return false;" /> 
                                </ItemTemplate> 
                                <ItemStyle Width="80%" HorizontalAlign="Left" /> 
                                <HeaderStyle Width="80%" HorizontalAlign="Center" /> 
                            </telerik:GridTemplateColumn> 
                            <telerik:GridTemplateColumn HeaderText="Edit" UniqueName="EditCommandColumn" HeaderStyle-HorizontalAlign="Center" 
                                ItemStyle-HorizontalAlign="Center" AllowFiltering="false" Resizable="false" ItemStyle-VerticalAlign="Middle">  
                                <ItemTemplate> 
                                    &nbsp;&nbsp;<asp:ImageButton ID="btnEdit" ToolTip="Edit" runat="server" ImageUrl="~/images/Edit.gif" 
                                        CommandName="Edit" CssClass="MyImageButton" Enabled="true" ImageAlign="Middle" />&nbsp;  
                                </ItemTemplate> 
                                <ItemStyle Width="30px" HorizontalAlign="Center" /> 
                                <HeaderStyle Width="30px" HorizontalAlign="Center" /> 
                            </telerik:GridTemplateColumn> 
                            <telerik:GridTemplateColumn HeaderText="Delete" UniqueName="DeleteCommandColumn" 
                                Resizable="false" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" 
                                AllowFiltering="false" ItemStyle-VerticalAlign="Middle">  
                                <ItemTemplate> 
                                    &nbsp;&nbsp;<asp:ImageButton ID="btnDelete" ToolTip="Delete" runat="server" ImageUrl="~/images/Delete.gif" 
                                        CommandName="Delete" CssClass="MyImageButton" Enabled="true" ImageAlign="Middle" />&nbsp;  
                                </ItemTemplate> 
                                <ItemStyle Width="30px" HorizontalAlign="Center" /> 
                                <HeaderStyle Width="30px" HorizontalAlign="Center" /> 
                            </telerik:GridTemplateColumn> 
                            <telerik:GridBoundColumn DataField="IsDeleted" UniqueName="IsDeleted" HeaderText="IsDeleted" 
                                Visible="false">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn DataField="IsUpdated" UniqueName="IsUpdated" HeaderText="IsUpdated" 
                                Visible="false">  
                            </telerik:GridBoundColumn> 
                        </Columns> 
                        <CommandItemTemplate> 
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">  
                                <tr> 
                                    <td width="40%" align="left" style="padding-left: 10px">  
                                        <asp:Label ID="lblGoal" runat="server" Text="Goal" ToolTip="The Bullseye - To become..." Font-Size="13px" Font-Bold="true"></asp:Label> 
                                    </td> 
                                    <td align="right" style="padding-right: 15px">  
                                    </td> 
                                    <td align="right" width="60%">  
                                        <table cellpadding="0" cellspacing="0" border="0">  
                                            <tr> 
                                                <td width="30px">  
                                                    <asp:ImageButton ID="imgbtnExport" OnClick="btn_ExportToExcel_Click" ImageUrl="~/images/icon_excel.gif" 
                                                        runat="server" ToolTip="Export To Excel" /> 
                                                </td> 
                                                <td width="60px">  
                                                    <asp:Image ID="Imge" ImageUrl="~/Images/AddRecord.gif" runat="server" /><asp:LinkButton  
                                                        ID="btn_Add" Font-Size="10px" Text="Add New" Font-Underline="true" runat="server" 
                                                        CommandName="InitInsert" Enabled="true" ToolTip="Add New Record"></asp:LinkButton> 
                                                </td> 
                                            </tr> 
                                        </table> 
                                    </td> 
                                </tr> 
                            </table> 
                        </CommandItemTemplate> 
                        <EditFormSettings PopUpSettings-Modal="true" PopUpSettings-Width="900px" EditFormType="Template">  
                            <FormTemplate> 
                                <table width="100%" cellpadding="0" cellspacing="0" border="0" style="background-color: #ffffff;  
                                    padding-left: 10px; height: 30px"> 
                                    <tr> 
                                        <td class="select_parameter" align="left" style="width: 60px">  
                                            Priority Order  
                                        </td> 
                                        <td align="left" style="width: 50px">  
                                            <telerik:RadComboBox ID="rdcmbGPriorityOrder" runat="server" Width="45px" Height="15px">  
                                            </telerik:RadComboBox> 
                                        </td> 
                                        <td class="select_parameter" align="left" style="width: 30px">  
                                            Goal  
                                        </td> 
                                        <td align="left" style="width: 65%">  
                                            <telerik:RadTextBox ID="txtGoal" Text='<% #Bind("Goal") %>' Width="100%" MaxLength="250" 
                                                runat="server" Font-Names="verdana" Font-Size="10px" Wrap="true" Height="15px">  
                                            </telerik:RadTextBox> 
                                        </td> 
                                        <td align="left" style="padding-left: 20px; width: 80px">  
                                            <asp:ImageButton ID="imgGUpdate" ToolTip='<%# (Container as GridItem).OwnerTableView.IsItemInserted ? "Insert" : "Update" %>' 
                                                runat="server" CommandName='<%# (Container as GridItem).OwnerTableView.IsItemInserted ? "PerformInsert" : "Update" %>' 
                                                ImageUrl="~/images/Update.gif" OnClientClick="if(!validationGoal())return false;">  
                                            </asp:ImageButton> 
                                            &nbsp;  
                                            <asp:ImageButton ID="imgGCancel" runat="server" CausesValidation="false" CommandName="Cancel" 
                                                ToolTip="Cancel" ImageUrl="~/images/Cancel.gif" OnClientClick="if(!CancelValidation())return false;" /> 
                                        </td> 
                                    </tr> 
                                </table> 
                            </FormTemplate> 
                        </EditFormSettings> 
                        <%--Goal Grid Ends--%> 
                    </MasterTableView> 
                </telerik:RadGrid> 
Hi Telerik

Expand/collapse image in hierarchical grid is not aligning properly. In my grid i am having data columns with edit and delete column and in some scenario i have to hide the edit and delete column in this case Expand/collapse image goes out of boundry. when all the columns are visible then also it is not properly aligning.(refer image1 and image2 attached here) Please reply ASAP.

Thanks a lot in advance to all Telerik Team
Waiting for reply
Binod

4 Answers, 1 is accepted

Sort by
0
Binod
Top achievements
Rank 1
answered on 01 Jun 2010, 03:19 PM
Hi Telerik

I did not hear anything from your side..

Please reply ................

Regards
Binod
0
Iana Tsolova
Telerik team
answered on 03 Jun 2010, 08:26 AM
Hi Binod,

I suggest that instead of hiding the whole edit and delete column, make only the Edit and Delete button invisible for the particular items.
Other than this it is hard to determine why the expand/collapse buttons are not aligned when all columns are visible. Can you share the server-side you have for customizing the grid either?

Kind regards,
Iana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Binod
Top achievements
Rank 1
answered on 15 Jun 2010, 09:51 AM
Hi Telerik

Thanks a lot for your reply.

In my case i can not hide only buttons, i have to hide enitre edit and delete columns. Anyway some how i able to fix the alignment, but in case of Column hiding expand/collapse button column width get increased as it is in image.
As you told i am also sharing server side code which i am using to hide/unhide columns.

 

protected void rdGOSTView_ItemCreated(object sender, GridItemEventArgs e)

 

{


 

if (e.Item is GridDataItem)

 

{

 

foreach (GridColumn column in e.Item.OwnerTableView.RenderColumns)

 

{

 

//you can check for other types of built-in columns as well

 

 

if (column is GridTemplateColumn)

 

{

 

GridTemplateColumn gtc = column as GridTemplateColumn;

 

 

if (gtc.UniqueName == "EditCommandColumn")

 

gtc.Display = Edit;

//true/false

 

 

if (gtc.UniqueName == "DeleteCommandColumn")

 

gtc.Display = Delete;

//true/false

 

}

}

}
}

0
Iana Tsolova
Telerik team
answered on 17 Jun 2010, 02:30 PM
Hello Binod,

Does hiding the odd columns by setting their Visible property to false instead of the Display one makes any difference?

All the best,
Iana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Binod
Top achievements
Rank 1
Answers by
Binod
Top achievements
Rank 1
Iana Tsolova
Telerik team
Share this question
or