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

InsertTemplate height

4 Answers 116 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Reid
Top achievements
Rank 2
Reid asked on 07 May 2011, 04:33 PM
When I place a RadGrid in InsertMode with EditFormType="AutoGenerated", the Insert form template is too tall.  When the same grid is in Edit Mode it works fine, the section containing all the controls does not extend the grids overall height. 

Any suggestions would be grand.

Thanks,
Reid

4 Answers, 1 is accepted

Sort by
0
Galin
Telerik team
answered on 12 May 2011, 02:39 PM
Hi Reid,

Based on the provided information it is hard to determine the exact cause of the problem you are facing. Could you please give us more details or possibly a small running project that we can use to reproduce the case? This will help us provide a better support.

Thanks.

Regards,
Galin
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Reid
Top achievements
Rank 2
answered on 12 May 2011, 03:51 PM

The form uses many data types so authentic reproduction would be too time consuming.  I will post the code for the markup.  There is nothing being done in code behind to adjust any dimensions othere than text box widths.

<telerik:RadPageView ID="pageVideoMarketing" runat="server" TabIndex="0">
                   <div id="messagesDiv">
                       <Controls:SystemErrorMessages ID="systemMessages" runat="server" Visible="false">
                       </Controls:SystemErrorMessages>
                   </div>
                   <telerik:RadGrid ID="ctrlRadGridVideos" runat="server" Height="700" AllowFilteringByColumn="True"
                       EnableAJAX="true" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
                       GridLines="None" ShowGroupPanel="True" ShowStatusBar="True" Skin="Telerik">
                       <StatusBarSettings ReadyText="Stand by" LoadingText="Working..." />
                       <ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="true" AllowColumnsReorder="true"
                           AllowDragToGroup="True">
                           <Selecting AllowRowSelect="True" />
                           <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                           <Resizing AllowColumnResize="True" />
                       </ClientSettings>
                       <MasterTableView CommandItemDisplay="TopAndBottom" DataKeyNames="PrimaryKey" EditItemStyle-ForeColor="#669999">
                           <RowIndicatorColumn>
                               <HeaderStyle Width="100px" />
                           </RowIndicatorColumn>
                           <ExpandCollapseColumn>
                               <HeaderStyle Width="100px" />
                           </ExpandCollapseColumn>
                           <Columns>
                               <telerik:GridEditCommandColumn HeaderStyle-Width="50" ItemStyle-ForeColor="Blue"
                                   UniqueName="Edit">
                                   <HeaderStyle Width="50px" />
                                   <ItemStyle ForeColor="Blue" />
                               </telerik:GridEditCommandColumn>
                               <telerik:GridBoundColumn DataField="VideoTitle" HeaderText="Video Title" UniqueName="VideoTitle"
                                   EditFormColumnIndex="0" ShowSortIcon="true">
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn DataField="VideoSubTitle" HeaderText="Sub Title" UniqueName="VideoSubTitle"
                                   EditFormColumnIndex="0" ShowSortIcon="true">
                               </telerik:GridBoundColumn>
                                 <telerik:GridBoundColumn DataField="Rating" HeaderText="Rating" UniqueName="RatingColumn"
                                   EditFormColumnIndex="0" ShowSortIcon="true">
                               </telerik:GridBoundColumn>
                               
                               <telerik:GridTemplateColumn HeaderText="Description" UniqueName="VideoDescription"
                                   EditFormColumnIndex="1" Visible="false" HeaderStyle-VerticalAlign="Top" HeaderStyle-Height="100%"
                                   ShowSortIcon="true">
                                   <EditItemTemplate>
                                       <telerik:RadEditor ID="ctrlVideoDescriptionRadEditor" runat="server" Content='<%# Bind("VideoDescription") %>'
                                           Height="100%" Width="100%" Skin="Web20">
                                           <ImageManager ViewPaths="~/Content/pages/uploads/images" UploadPaths="~/Content/pages/uploads/images"
                                               DeletePaths="~/Content/pages/uploads/images" />
                                           <MediaManager ViewPaths="~/Content/pages/uploads/media" UploadPaths="~/Content/pages/uploads/media"
                                               DeletePaths="~/Content/pages/uploads/media" />
                                           <FlashManager ViewPaths="~/Content/pages/uploads/flash" UploadPaths="~/Content/pages/uploads/flash"
                                               DeletePaths="~/Content/pages/uploads/flash" />
                                           <TemplateManager ViewPaths="~/Content/pages/uploads/templates" UploadPaths="~/Content/pages/uploads/templates"
                                               DeletePaths="~/Content/pages/uploads/templates" />
                                           <DocumentManager ViewPaths="~/Content/pages/uploads/documents" UploadPaths="~/Content/pages/uploads/documents"
                                               DeletePaths="~/Content/pages/uploads/documents" />
                                           <SilverlightManager ViewPaths="~/Content/pages/uploads/silverlight" UploadPaths="~/Content/pages/uploads/silverlight"
                                               DeletePaths="~/Content/pages/uploads/silverlight" />
                                           <CssFiles>
                                               <telerik:EditorCssFile Value="~/Content/css/RadEditorContentArea.css" />
                                           </CssFiles>
                                       </telerik:RadEditor>
                                   </EditItemTemplate>
                               </telerik:GridTemplateColumn>
                               <telerik:GridTemplateColumn HeaderText="Type" UniqueName="VideoType" EditFormColumnIndex="0"
                                   Visible="false">
                                   <EditItemTemplate>
                                       <telerik:RadComboBox ID="ctrlVideoTypeRadComboBox" runat="server" Width="220px" Skin="Web20" />
                                   </EditItemTemplate>
                                   <ItemTemplate>
                                       <asp:Label ID="ctrlVideoTypeLabel" runat="server" Text="Video Type" />
                                   </ItemTemplate>
                               </telerik:GridTemplateColumn>
                               <telerik:GridTemplateColumn HeaderText="Category" UniqueName="VideoCategory" EditFormColumnIndex="0"
                                   Visible="false">
                                   <EditItemTemplate>
                                       <telerik:RadComboBox ID="ctrlVideoCategoryRadComboBox" runat="server" Width="220px"
                                           Skin="Web20" />
                                   </EditItemTemplate>
                                   <ItemTemplate>
                                       <asp:Label ID="ctrlVideoCategoryLabel" runat="server" Text="Video Category" />
                                   </ItemTemplate>
                               </telerik:GridTemplateColumn>
                               <telerik:GridBoundColumn DataField="VideoHyperlink" HeaderText="URL Hyperlink" UniqueName="VideoHyperlink"
                                   EditFormColumnIndex="0" Visible="false">
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn DataField="SEOKeywords" HeaderText="SEO Keywords" UniqueName="SEOKeywords"
                                   EditFormColumnIndex="0" Visible="false">
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn DataField="SEODescription" HeaderText="SEO Description"
                                   UniqueName="SEODescription" EditFormColumnIndex="0" Visible="false">
                               </telerik:GridBoundColumn>
                               <telerik:GridTemplateColumn HeaderText="Rating" UniqueName="Rating" EditFormColumnIndex="0" Visible="false">
                                   <EditItemTemplate>
                                       <asp:TextBox ID="ctrlVideoRatingRadTextBox" runat="server" ValidationGroup="checkRating"
                                           Width="80px" Text='<%# Bind("Rating") %>' />
                                       <asp:RegularExpressionValidator ID="RegularExpressionValidatorRating" runat="server"
                                           ControlToValidate="ctrlVideoRatingRadTextBox" ErrorMessage="Please Enter Only Numbers"
                                           ValidationExpression="^\d+$" ValidationGroup="checkRating" ForeColor="Red">
                                       </asp:RegularExpressionValidator>
                                       <asp:RequiredFieldValidator runat="server" ControlToValidate="ctrlVideoRatingRadTextBox"
                                           Display="Dynamic" ErrorMessage="Rating is required" ForeColor="Red"></asp:RequiredFieldValidator>
                                   </EditItemTemplate>
                                   <ItemTemplate>
                                       <asp:Label ID="ctrlVideoRatingLabel" runat="server" Text="" />
                                   </ItemTemplate>
                               </telerik:GridTemplateColumn>
                               <telerik:GridTemplateColumn HeaderText="Height" UniqueName="Height" EditFormColumnIndex="0"
                                   Visible="false">
                                   <EditItemTemplate>
                                       <asp:TextBox ID="ctrlVideoHeightTextBox" runat="server" ValidationGroup="checkHeight"
                                           Width="80px" Text='<%# Bind("Height") %>' />
                                       <asp:RegularExpressionValidator ID="RegularExpressionValidatorHeight" runat="server"
                                           ControlToValidate="ctrlVideoHeightTextBox" ErrorMessage="Please Enter Only Numbers"
                                           ValidationExpression="^\d+$" ValidationGroup="checkHeight" ForeColor="Red">
                                       </asp:RegularExpressionValidator>
                                       <asp:RequiredFieldValidator runat="server" ControlToValidate="ctrlVideoHeightTextBox"
                                           Display="Dynamic" ErrorMessage="Height is required" ForeColor="Red"></asp:RequiredFieldValidator>
                                   </EditItemTemplate>
                                   <ItemTemplate>
                                       <asp:Label ID="ctrlVideoHeightLabel" runat="server" Text="Height" />
                                   </ItemTemplate>
                               </telerik:GridTemplateColumn>
                               <telerik:GridTemplateColumn HeaderText="Width" UniqueName="Width" EditFormColumnIndex="0"
                                   Visible="false">
                                   <EditItemTemplate>
                                       <asp:TextBox ID="ctrlVideoWidthTextBox" runat="server" ValidationGroup="checkWidth"
                                           Width="80px" Text='<%# Bind("Width") %>' />
                                       <asp:RegularExpressionValidator ID="RegularExpressionValidatorWidth" runat="server"
                                           ControlToValidate="ctrlVideoWidthTextBox" ErrorMessage="Please Enter Only Numbers"
                                           ValidationExpression="^\d+$" ValidationGroup="checkWidth" ForeColor="Red">
                                       </asp:RegularExpressionValidator>
                                       <asp:RequiredFieldValidator runat="server" ControlToValidate="ctrlVideoWidthTextBox"
                                           Display="Dynamic" ErrorMessage="Width is required" ForeColor="Red"></asp:RequiredFieldValidator>
                                   </EditItemTemplate>
                                   <ItemTemplate>
                                       <asp:Label ID="ctrlVideoWidthLabel" runat="server" Text="Width" />
                                   </ItemTemplate>
                               </telerik:GridTemplateColumn>
                               <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="Delete"
                                   HeaderStyle-Width="50" ConfirmText="Confirm: Delete Selected Video?" ConfirmTitle="Confirmation"
                                   ItemStyle-ForeColor="Blue">
                                   <HeaderStyle Width="50px" />
                                   <ItemStyle ForeColor="Blue" />
                               </telerik:GridButtonColumn>
                           </Columns>
                           <EditItemStyle ForeColor="#669999" />
                           <PagerStyle AlwaysVisible="True" />
                           <EditFormSettings EditFormType="AutoGenerated" FormStyle-Height="500" FormStyle-Width="100%"
                               ColumnNumber="3">
                               <FormTableItemStyle Wrap="False"></FormTableItemStyle>
                               <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
                               <FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="3" Width="100%" />
                               <FormTableStyle GridLines="Horizontal" CellSpacing="0" CellPadding="2" CssClass="module"
                                   Height="110px" Width="100%" />
                               <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
                               <FormStyle Height="700px" Width="100%" />
                           </EditFormSettings>
                       </MasterTableView>
                       <ValidationSettings CommandsToValidate="PerformInsert,Update" />
                   </telerik:RadGrid>


Thanks
0
Galin
Telerik team
answered on 20 May 2011, 12:56 PM
Hi Reid,

In the markup you set Height="700px" of FormStyle, therefore the Insert form template is so tall. To resolve the problem you can remove the property or increase it, but keep in mind its default value is "500px".

Part of your markup:

<EditFormSettings EditFormType="AutoGenerated" FormStyle-Height="500" FormStyle-Width="100%"ColumnNumber="3">
               ...
               ...
                            ...
      
               <FormStyle Height="700px" Width="100%" />
</EditFormSettings>

All the best,
Galin
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Reid
Top achievements
Rank 2
answered on 20 May 2011, 02:21 PM
Thanks Galin, I removed the height references and it is consistent with edit mode.  That solved it.
Tags
Grid
Asked by
Reid
Top achievements
Rank 2
Answers by
Galin
Telerik team
Reid
Top achievements
Rank 2
Share this question
or