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

EditTemplate with RadGrid

6 Answers 140 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jack
Top achievements
Rank 1
Jack asked on 29 Jan 2009, 03:04 PM
Hi,

I have a problem with a grid into a FormTemplate (edit). This 2 grid are <Scrolling AllowScroll="true"/>. When i switch in editMode, 2 scrollbars appear, but this first scrollbar (from 1st grid in editmode) when i scroll this my second (into my editTemplate) stay at same position. 

If i set <Scrolling AllowScroll="False"/> this is ok because i have only 1 scrollbar.

Show the result at this URL : Show me

Skin="Office2007"

Ty

6 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 02 Feb 2009, 03:47 PM
Hi Jack,

The issue from the screenshot is indeed strange and unfortunately I was not able to reproduce it locally. Is it possible for you to provide a live url where the discrepancy can be seen? Additionally, you can paste the code from the problematic page/user control in this forum post using the 'Format code block' tool at the top right corner of the forums editor. Thus we will be able to research the matter further and provide accurate explanation/fix.

Kind regards,
Sebastian
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Jack
Top achievements
Rank 1
answered on 03 Feb 2009, 09:08 PM
    <table>         
        <tr> 
            <td style="width: 940px; height: 520px;"
                <div style="margin-left: 0px; margin-right: 0px; margin-bottom: 4px; margin-top: 5px; 
                    font-size: 11px; font-family: Tahoma;"> 
                    <telerik:RadGrid ID="grdRoles" runat="server" Skin="Office2007" AllowSorting="True" EnableAJAX="True" 
                        AllowMultiRowEdit="false" HorizontalAlign="NotSet" Height="100%" Width="100%" SortingSettings-SortToolTip="<%$ Resources:ToolTipSort %>" 
                        BackColor="white" LoadingTemplateTransparency="30" EnableAJAXLoadingTemplate="true" GridLines="None"
                        <ClientSettings> 
                            <Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="425px"></Scrolling> 
                            <Selecting AllowRowSelect="True" /> 
                        </ClientSettings> 
                        <HeaderStyle Font-Bold="true" /> 
                        <MasterTableView AutoGenerateColumns="False" GridLines="None" EditMode="EditForms" 
                            CommandItemDisplay="Top" DataKeyNames="ID" TableLayout="fixed"
                            <CommandItemTemplate> 
                                <asp:LinkButton ID="LinkbtAdd" runat="server" Text="Ajouter un rĂ´le" CommandName="InitInsert"
                                    <img style="border: 0px" alt="" src="images/AddRecord.Gif" /> 
                                    <asp:Literal ID="Literal1" runat="server" Text=" <%$ Resources:tooltipAddRole%>"></asp:Literal> 
                                </asp:LinkButton> 
                            </CommandItemTemplate> 
                            <Columns> 
                                <Telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ButtonType="ImageButton" 
                                    EditText="<%$ Resources:tooltipEditRole%>" EditImageUrl="~/RadControls/Grid/Skins/Outlook/Edit.Gif"
                                    <HeaderStyle Width="36px" /> 
                                    <ItemStyle HorizontalAlign="Center" /> 
                                </Telerik:GridEditCommandColumn> 
                                <Telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ImageUrl="~/RadControls/Grid/Skins/Outlook/Delete.Gif" 
                                    ShowInEditForm="false" Text="<%$ Resources:tooltipDeleteRole%>" UniqueName="BtnDeleteColumn" 
                                    ConfirmText="<%$ Resources:ConfirmDeleteText%>"
                                    <HeaderStyle Width="20px" /> 
                                    <ItemStyle HorizontalAlign="Center" /> 
                                </Telerik:GridButtonColumn> 
                                <Telerik:GridBoundColumn AllowFiltering="False" DataField="RoleName" Groupable="False" 
                                    HeaderText="<%$ Resources:grdHeaderRoleName %>" Reorderable="False" Resizable="False" 
                                    SortExpression="RoleName" UniqueName="RoleName"
                                    <HeaderStyle Font-Bold="True" Width="100%" /> 
                                </Telerik:GridBoundColumn> 
                                <Telerik:GridBoundColumn DataField="ID" Display="false" UniqueName="ID"
                                </Telerik:GridBoundColumn> 
                            </Columns> 
                            <EditFormSettings EditFormType="Template"
                                <FormTemplate> 
                                    <br /> 
                                    <table bgcolor="#F0F8FF" width="928px" border="1"
                                        <tr> 
                                            <td> 
                                                <asp:ImageButton ID="ibtnUpdate" runat="server" ImageUrl="~/images/Update.Gif" ToolTip="<%$ Resources:TooltipUpdateRole %>" 
                                                    CommandName='<%# IIf( cbool(DataBinder.Eval(Container, "OwnerTableView.IsItemInserted")), "PerformInsert", "Update") %>' /> 
                                                <asp:ImageButton ID="ibtnCancel" runat="server" ImageUrl="~/images/Cancel.Gif" ToolTip="<%$ Resources:TooltipCancelRole %>" 
                                                    CausesValidation="false" CommandName="Cancel" /> 
                                            </td> 
                                        </tr> 
                                        <tr> 
                                            <td> 
                                                <table> 
                                                    <tr> 
                                                        <td valign="top" style="width: 80px"
                                                            <asp:Label ID="lblRoleName" runat="server" Text="<%$ Resources:grdHeaderRoleName %>" 
                                                                SkinID="IDlblBold"></asp:Label> 
                                                        </td> 
                                                        <td valign="top" style="width: 820px"
                                                            <asp:HiddenField ID="hfIdRole" runat="server" Value='<%# Bind( "ID") %>' /> 
                                                            <asp:TextBox runat="server" ID="txtRoleName" Text='<%# Bind( "RoleName") %>' Width="200px" 
                                                                MaxLength="100"></asp:TextBox> 
                                                            <asp:RequiredFieldValidator ID="rfvRoleName" runat="server" ControlToValidate="txtRoleName" 
                                                                ErrorMessage="<%$ Resources:ErrorEmptyRoleNameValidation %>" Display="Dynamic" 
                                                                Text="*"></asp:RequiredFieldValidator> 
                                                            <asp:CustomValidator ID="CustomValidator1" runat="server" ControlToValidate="txtRoleName" 
                                                                ErrorMessage="<%$ Resources:ErrorSameRoleNameValidation %>" OnServerValidate="RoleNameValidation" 
                                                                Text="*" Display="Dynamic"></asp:CustomValidator> 
                                                            <br /> 
                                                            <asp:ValidationSummary ID="vsNameRole" runat="server" DisplayMode="List" /> 
                                                        </td> 
                                                    </tr> 
                                                    <tr> 
                                                        <td valign="top" colspan="2"
                                                            <asp:Label ID="lblPermissionList" runat="server" Text="<%$ Resources:HeaderPermissionList %>" 
                                                                SkinID="IDlblBold"></asp:Label> 
                                                        </td> 
                                                    </tr> 
                                                    <tr> 
                                                        <td valign="top" colspan="2"
                                                            <telerik:RadGrid ID="rgPermissions" runat="server" Skin="Office2007" Width="100%" Height="200px"
                                                                <ClientSettings AllowGroupExpandCollapse="true"
                                                                    <Scrolling AllowScroll="true"/> 
                                                                    <Selecting AllowRowSelect="true" /> 
                                                                </ClientSettings> 
                                                                <MasterTableView AutoGenerateColumns="false"
                                                                    <EditFormSettings> 
                                                                        <EditColumn UniqueName="EditCommandColumn"
                                                                        </EditColumn> 
                                                                    </EditFormSettings> 
                                                                    <GroupByExpressions> 
                                                                        <Telerik:GridGroupByExpression> 
                                                                            <SelectFields> 
                                                                                <Telerik:GridGroupByField FieldName="Category" HeaderText=" " HeaderValueSeparator="" /> 
                                                                            </SelectFields> 
                                                                            <GroupByFields> 
                                                                                <Telerik:GridGroupByField FieldName="Category" HeaderText="-" /> 
                                                                            </GroupByFields> 
                                                                        </Telerik:GridGroupByExpression> 
                                                                    </GroupByExpressions> 
                                                                    <Columns> 
                                                                        <Telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" HeaderStyle-HorizontalAlign="Center" 
                                                                            ItemStyle-HorizontalAlign="center" HeaderStyle-Width="25px" ItemStyle-Width="25px" > 
                                                                        </Telerik:GridClientSelectColumn> 
                                                                        <Telerik:GridBoundColumn DataField="Description" HeaderText="" UniqueName="Description"
                                                                            <HeaderStyle Width="830px" /> 
                                                                            <ItemStyle Width="830px" /> 
                                                                        </Telerik:GridBoundColumn> 
                                                                        <Telerik:GridBoundColumn DataField="ID" HeaderText="" UniqueName="ID" Display="False"
                                                                            <HeaderStyle Width="0px" /> 
                                                                            <ItemStyle Width="0px" /> 
                                                                        </Telerik:GridBoundColumn>                                                                         
                                                                    </Columns> 
                                                                    <NoRecordsTemplate> 
                                                                        <asp:Label ID="lblPermissionsEmpty" runat="server" Text="<%$Resources:lblPermissionsEmpty.Text %>"></asp:Label> 
                                                                    </NoRecordsTemplate> 
                                                                </MasterTableView> 
                                                            </telerik:RadGrid> 
                                                        </td> 
                                                    </tr> 
                                                </table> 
                                            </td> 
                                        </tr> 
                                    </table> 
                                </FormTemplate> 
                            </EditFormSettings> 
                        </MasterTableView> 
                    </telerik:RadGrid> 
                </div> 
            </td> 
        </tr> 
    </table> 
    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="grdRoles"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="grdRoles" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManagerProxy> 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" 
        Width="75px"
        <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' 
            style="border: 0px;" /> 
    </telerik:RadAjaxLoadingPanel> 
 
 
0
Sebastian
Telerik team
answered on 06 Feb 2009, 04:05 PM
Hi Jack,

Does setting fixed headers (ClientSettings -> Scrolling -> UseStaticHeaders = true) for the grid inside the FormTemplate custom edit form makes a difference? Furthermore, I suggest you inspect the rendered html of the page using IE developer toolbar or FireBug to investigate what causes the unwanted visual glitch or provide a live url where this discrepancy can be examined further.

Kind regards,
Sebastian
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Jack
Top achievements
Rank 1
answered on 06 Feb 2009, 04:24 PM
Hi,

I already try this (ClientSettings -> Scrolling -> UseStaticHeaders = true) and the difference is the header stay and detail move always. A part of the problem was resolved, but not the main problem :)

I had inspect code with  IE developer toolbar, but i don't see anything in problem. Only if don't AllowScroll="true" for resolved problem, but i can't do that.

Do you reproduce this problem with my html code?

ty
0
Sebastian
Telerik team
answered on 09 Feb 2009, 05:45 PM
Hello Jack,

Unfortunately I am not able to recreate the issue in my local tests using your code. Is it possible for you to provide a live url where this abnormality can be seen? I will examine the html source and will do everything possible to provide more to-the-point explanation/fix.

Kind regards,
Sebastian
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Jack
Top achievements
Rank 1
answered on 13 Feb 2009, 06:17 PM
I resolved this problem with EditMode="popup"

ty
Tags
Grid
Asked by
Jack
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Jack
Top achievements
Rank 1
Share this question
or