Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
127 views
I placed a ValidationSummary control in my form template. When a validation message is displayed the size of the popup window does not increase nor do scroll bars appear. Instead it pushes other controls off the form (see screenshot).

You may duplicate this issue by replacing the aspx page in the Telerik's demo page for "Grid/Data Editing/Form Template Edit Form" with the following:

<%@ Page Language="C#" CodeFile="DefaultCS.aspx.cs" Inherits="Grid.Examples.DataEditing.TemplateFormUpdate.DefaultCS"
    MasterPageFile="~/MasterPage.master" %>
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <p id="divMsgs" runat="server">
        <asp:Label ID="Label1" runat="server" EnableViewState="False" Font-Bold="True" ForeColor="#FF8080">
        </asp:Label>
        <asp:Label ID="Label2" runat="server" EnableViewState="False" Font-Bold="True" ForeColor="#00C000">
        </asp:Label>
    </p>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function RowDblClick(sender, eventArgs) {
                sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
            }
        </script>
    </telerik:RadCodeBlock>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1">
                    </telerik:AjaxUpdatedControl>
                    <telerik:AjaxUpdatedControl ControlID="divMsgs"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadGrid ID="RadGrid1" runat="server" CssClass="RadGrid" GridLines="None"
        AllowPaging="True" PageSize="20" AllowSorting="True" AutoGenerateColumns="False"
        ShowStatusBar="true" AllowAutomaticDeletes="True" AllowAutomaticInserts="True"
        AllowAutomaticUpdates="True" DataSourceID="SqlDataSource1" OnItemDeleted="RadGrid1_ItemDeleted"
        OnItemInserted="RadGrid1_ItemInserted" OnItemUpdated="RadGrid1_ItemUpdated" OnItemCommand="RadGrid1_ItemCommand"
        OnPreRender="RadGrid1_PreRender">
        <MasterTableView CommandItemDisplay="TopAndBottom" DataSourceID="SqlDataSource1"
            DataKeyNames="EmployeeID" EditMode="PopUp">
            <Columns>
                <telerik:GridEditCommandColumn>
                </telerik:GridEditCommandColumn>
                <telerik:GridBoundColumn UniqueName="EmployeeID" HeaderText="ID" DataField="EmployeeID">
                    <HeaderStyle ForeColor="Silver" Width="20px"></HeaderStyle>
                    <ItemStyle ForeColor="Gray"></ItemStyle>
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn UniqueName="TitleOfCourtesy" HeaderText="TOC" DataField="TitleOfCourtesy">
                    <HeaderStyle Width="60px"></HeaderStyle>
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn UniqueName="FirstName" HeaderText="FirstName" DataField="FirstName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn UniqueName="LastName" HeaderText="LastName" DataField="LastName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn UniqueName="HireDate" HeaderText="Hire Date" DataField="HireDate"
                    DataFormatString="{0:d}">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn UniqueName="Title" HeaderText="Title" DataField="Title">
                </telerik:GridBoundColumn>
                <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="column">
                </telerik:GridButtonColumn>
            </Columns>
            <EditFormSettings EditFormType="Template" PopUpSettings-Width="800px">
                <FormTemplate>
                    <asp:ValidationSummary ID="ValidationSummary1" runat="server" />
                    <table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none"
                        style="border-collapse: collapse;">
                        <tr class="EditFormHeader">
                            <td colspan="2" style="font-size: small">
                                <b>Employee Details</b>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <b>Company Info:</b>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <table id="Table3" cellspacing="1" cellpadding="1" width="250" border="0" class="module">
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Country:
                                        </td>
                                        <td>
                                            <asp:TextBox ID="TextBox7" runat="server" Text='<%# Bind("Country") %>'>
                                            </asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Country Required" ControlToValidate="TextBox7"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            City:
                                        </td>
                                        <td>
                                            <asp:TextBox ID="TextBox8" runat="server" Text='<%# Bind("City") %>' TabIndex="1">
                                            </asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="City Required" ControlToValidate="TextBox8"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Region:
                                        </td>
                                        <td>
                                            <asp:TextBox ID="TextBox9" runat="server" Text='<%# Bind("Region") %>' TabIndex="2">
                                            </asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="Region Required" ControlToValidate="TextBox9"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Home Phone:
                                        </td>
                                        <td>
                                            <telerik:RadMaskedTextBox ID="HomePhoneBox" runat="server" SelectionOnFocus="SelectAll"
                                                Text='<%# Bind("HomePhone") %>' PromptChar="_" Width="300px" Mask="(###) ###-####"
                                                TabIndex="3">
                                            </telerik:RadMaskedTextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="Home Phone Required" ControlToValidate="HomePhoneBox"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Birth Date:
                                        </td>
                                        <td>
                                            <telerik:RadDatePicker ID="BirthDatePicker" runat="server" MinDate="1/1/1900" DbSelectedDate='<%# Bind("BirthDate") %>'
                                                TabIndex="4">
                                            </telerik:RadDatePicker>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="Birth Date Required" ControlToValidate="BirthDatePicker"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Title Of Courtesy
                                        </td>
                                        <td>
                                            <asp:DropDownList ID="ddlTOC" runat="server" SelectedValue='<%# Bind("TitleOfCourtesy") %>'
                                                DataSource='<%# (new string[] { "Dr.", "Mr.", "Mrs.", "Ms." }) %>' TabIndex="7"
                                                AppendDataBoundItems="True">
                                                <asp:ListItem Selected="True" Text="Select" Value="">
                                                </asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td>
                                <table id="Table1" cellspacing="1" cellpadding="1" width="250" border="0" class="module">
                                    <tr>
                                        <td>
                                            Notes:
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:TextBox ID="TextBox1" Text='<%# Bind("Notes") %>' runat="server" TextMode="MultiLine"
                                                Rows="5" Columns="40" TabIndex="5">
                                            </asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Address:
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:TextBox ID="TextBox6" Text='<%# Bind("Address") %>' runat="server" TextMode="MultiLine"
                                                Rows="2" Columns="40" TabIndex="6">
                                            </asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="Address Required" ControlToValidate="TextBox6"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <b>Personal Info:</b>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <table id="Table4" cellspacing="1" cellpadding="1" width="250" border="0" class="module">
                                    <tr>
                                        <td>
                                            FirstName:
                                        </td>
                                        <td>
                                            <asp:TextBox ID="TextBox2" Text='<%# Bind( "FirstName") %>' runat="server" TabIndex="8">
                                            </asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ErrorMessage="First Name Required" ControlToValidate="TextBox2"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Last Name:
                                        </td>
                                        <td>
                                            <asp:TextBox ID="TextBox3" Text='<%# Bind( "LastName") %>' runat="server" TabIndex="9">
                                            </asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ErrorMessage="Last Name Required" ControlToValidate="TextBox3"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Hire Date:
                                        </td>
                                        <td>
                                            <telerik:RadDatePicker ID="HireDatePicker" DbSelectedDate='<%# Bind( "HireDate") %>'
                                                runat="server" TabIndex="10">
                                            </telerik:RadDatePicker>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ErrorMessage="Hire Date Required" ControlToValidate="HireDatePicker"></asp:RequiredFieldValidator>
                                             
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Title:
                                        </td>
                                        <td>
                                            <asp:TextBox ID="TextBox4" Text='<%# Bind( "Title") %>' runat="server" TabIndex="11">
                                            </asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ErrorMessage="Title Required" ControlToValidate="TextBox4"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" colspan="2">
                                <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                    runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                </asp:Button> 
                                <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                    CommandName="Cancel"></asp:Button>
                            </td>
                        </tr>
                    </table>
                </FormTemplate>
            </EditFormSettings>
        </MasterTableView>
        <ClientSettings>
            <ClientEvents OnRowDblClick="RowDblClick"></ClientEvents>
        </ClientSettings>
    </telerik:RadGrid>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TelerikConnectionString35 %>"
        DeleteCommand="DELETE FROM [Employees_Northwind] WHERE [EmployeeID] = @EmployeeID"
        InsertCommand="INSERT INTO [Employees_Northwind] ([LastName], [FirstName], [Title], [TitleOfCourtesy], [BirthDate], [HireDate], [Address], [City], [Region], [Country], [HomePhone], [Notes], [ReportsTo]) VALUES (@LastName, @FirstName, @Title, @TitleOfCourtesy, @BirthDate, @HireDate, @Address, @City, @Region, @Country, @HomePhone, @Notes, @ReportsTo)"
        SelectCommand="SELECT * FROM [Employees_Northwind]" UpdateCommand="UPDATE [Employees_Northwind] SET [LastName] = @LastName, [FirstName] = @FirstName, [Title] = @Title, [TitleOfCourtesy] = @TitleOfCourtesy, [BirthDate] = @BirthDate, [HireDate] = @HireDate, [Address] = @Address, [City] = @City, [Region] = @Region, [Country] = @Country, [HomePhone] = @HomePhone, [Notes] = @Notes WHERE [EmployeeID] = @EmployeeID">
        <DeleteParameters>
            <asp:Parameter Name="EmployeeID" Type="Int32"></asp:Parameter>
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="LastName" Type="String"></asp:Parameter>
            <asp:Parameter Name="FirstName" Type="String"></asp:Parameter>
            <asp:Parameter Name="Title" Type="String"></asp:Parameter>
            <asp:Parameter Name="TitleOfCourtesy" Type="String"></asp:Parameter>
            <asp:Parameter Name="BirthDate" Type="DateTime"></asp:Parameter>
            <asp:Parameter Name="HireDate" Type="DateTime"></asp:Parameter>
            <asp:Parameter Name="Address" Type="String"></asp:Parameter>
            <asp:Parameter Name="City" Type="String"></asp:Parameter>
            <asp:Parameter Name="Region" Type="String"></asp:Parameter>
            <asp:Parameter Name="Country" Type="String"></asp:Parameter>
            <asp:Parameter Name="HomePhone" Type="String"></asp:Parameter>
            <asp:Parameter Name="Notes" Type="String"></asp:Parameter>
            <asp:Parameter Name="ReportsTo" Type="Int32" DefaultValue=""></asp:Parameter>
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="LastName" Type="String"></asp:Parameter>
            <asp:Parameter Name="FirstName" Type="String"></asp:Parameter>
            <asp:Parameter Name="Title" Type="String"></asp:Parameter>
            <asp:Parameter Name="TitleOfCourtesy" Type="String"></asp:Parameter>
            <asp:Parameter Name="BirthDate" Type="DateTime"></asp:Parameter>
            <asp:Parameter Name="HireDate" Type="DateTime"></asp:Parameter>
            <asp:Parameter Name="Address" Type="String"></asp:Parameter>
            <asp:Parameter Name="City" Type="String"></asp:Parameter>
            <asp:Parameter Name="Region" Type="String"></asp:Parameter>
            <asp:Parameter Name="Country" Type="String"></asp:Parameter>
            <asp:Parameter Name="HomePhone" Type="String"></asp:Parameter>
            <asp:Parameter Name="Notes" Type="String"></asp:Parameter>
            <asp:Parameter Name="EmployeeID" Type="Int32"></asp:Parameter>
        </UpdateParameters>
    </asp:SqlDataSource>
    <br />
</asp:Content>


Konstantin Dikov
Telerik team
 answered on 29 Sep 2014
1 answer
125 views
I am trying to switch off columns for display from your Demo on:

demos.telerik.com/aspnet-ajax/grid/examples/functionality/exporting/pdf-export/defaultvb.aspx


like this:

 Protected Sub DownloadPDF_Click(sender As Object, e As EventArgs)
        isPdfExport = True
        dtgProducts.MasterTableView.GetColumnSafe("Vrd").Display = False
        dtgProducts.MasterTableView.ExportToPdf()
    End Sub

but the column keeps displaying in the PDF.

Marc
Fit2Page
Top achievements
Rank 3
Bronze
Bronze
Iron
 answered on 29 Sep 2014
3 answers
344 views
hello,

can you please guide me on how to set an image on to a chart background, ive tried everything but im unable to set a background to my chart it always shows blank, do also please guide me on where to put the image file in order to reference it.

thanks
Danail Vasilev
Telerik team
 answered on 29 Sep 2014
6 answers
277 views
I have a RadGrid with two GridTemplateColumns and a RadDropDownList in each of them. I would like to show/hide another controls depending on the selection made in both RadDropDownLists when inserting or editing a row.
I have tried to implement OnClientSelectedIndexChanged however i do not know how to access the rest of controls of the same row to achieve that.

Any help will be welcome.  
Konstantin Dikov
Telerik team
 answered on 29 Sep 2014
8 answers
401 views
Hi

I dont want the radcalendar to display dates from months other than the one selected on the header. Suppose I select july means, after july 31 the calendar display august dates. Please help
Saira
Alok
Top achievements
Rank 1
 answered on 29 Sep 2014
7 answers
577 views
Hello Telerik-team

I'm trying to use the RadGrid with an ObjectDataSource which delivers the Data in a List<Object>.

We can see the data in the RadGrid and paging is working fine.

But we can't sort the data. We get the error.

Die Datenquelle "odsdata" unterstützt das Sortieren von IEnumerable-Daten nicht. Die automatische Sortierung wird nur für DataView, DataTable und DataSet unterstützt.
or translated in english:

The datasource "odsdata" does not support the Sorting of IEnumerable-Data. The automatic sorting is only supported for DataView ...


In our software architectur we have to work with list<object> and the ObjectDataSource.

I tried to use the RadGrid OnSortCommand-Event, but I can't bind the sortet list<object> because I use the DataSourceID of the ObjectDataSource and can#t rebind the Data.

Are there any idea to solve the problem?

Christian
Nathan
Top achievements
Rank 1
 answered on 28 Sep 2014
3 answers
179 views
I have implemented a RadMenu with everything being handled in the code behind.  I am trying to dynamically set the number of columns based on the total number of menu items (nodes and child nodes).  I am doing something like this:

// determine column count
int rowsPerColumn = 15; // [TODO] Add value to site meta data to allow adjusting length per site
int columnCount = (int)Math.Ceiling(((double)_menuItemCount / (double)rowsPerColumn));
rootLevelSetting.ListLayout.RepeatColumns = columnCount;

The value for _menuItemCount is being updated during the PopulateSiteMap function.  That is working fine.  And, so is the assigning of the column count.  For one of my menu items, I am getting a long first column and short second and third columns.  Three columns should work fine.  I have attached some images for review.  Ideally, the second column should start with the External category.

Any help would be appreciated!
Bill
Telerik.Web.UI v2013.1.220.40 (I know we are behind a bit -- working on that :) )
Boyan Dimitrov
Telerik team
 answered on 27 Sep 2014
4 answers
119 views
Hi,
i started to develop a booking system health for Italy MarketPlace. According to doctor's agenda, i've to display only some days in a week (the days configurated in the diary configuration), in addition to i've to use different interval (calling section) between morning and afternoon, i.e. i've to display an appointment 20 minutes length in the morning and an appointment 30 minutes length in the afternoon.
Could It's possible to do tthis using RadScheduler??
Sorry in advance for my poor English.
Boyan Dimitrov
Telerik team
 answered on 27 Sep 2014
2 answers
262 views
Hi,

Here's the problematic situation. I've got a very simple UL list in a RadToolTip. In IE8, the list bullets do not appear until I move my cursor over the tooltip. No CSS is applied to the tooltip or list.

Attached are two images: initial rendering (before the mouse hovers the tooltip) and after.

In classic MS way, the problem is only with IE8. Firefox, Safari and Chrome appear to behave correctly.

   <asp:Button ID="btnTooltip" runat="server" Text="ToolTip" /> 
   <telerik:RadToolTip ID="RadToolTip1" runat="server" TargetControlID="btnTooltip"> 
      <ul> 
         <li>item 1</li> 
         <li>item 2</li> 
         <li>item 3</li> 
      </ul> 
   </telerik:RadToolTip> 

Can you please provide a fix or workaround?

Thanks,

dstj.
using version 2009.3.1103.35
Gaston
Top achievements
Rank 1
 answered on 26 Sep 2014
3 answers
319 views
Hi,

I am formatting a column ( Amount) based on another column ( Flag). I want to hide the column 'Flag' in grid PreRender. Can someone help me on how to achieve it?

Thanks in advance.
ts
Top achievements
Rank 1
 answered on 26 Sep 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?